Re: gzip bug w/ patch..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 30, 2001 at 02:26:10PM -0000, greg wrote:

> well anyway, there is an attached patch, bye.

> -           strcpy(nbuf,dir);
> +           strncpy(nbuf, dir, sizeof(nbuf) - 1);

You must ensure the trailing NUL character is at the end of the
string:
  nbuf[sizeof(nbuf) - 1] = '\0';


Tim

[Index of Archives]     [Linux Security]     [Netfilter]     [PHP]     [Yosemite News]     [Linux Kernel]

  Powered by Linux