Re: (yet) more buffer paranoia - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: (yet) more buffer paranoia
Date
Msg-id Pine.LNX.4.44.0208281855170.951-100000@localhost.localdomain
Whole thread Raw
In response to (yet) more buffer paranoia  (Neil Conway <neilc@samurai.com>)
Responses Re: (yet) more buffer paranoia  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Neil Conway writes:

> This patches replaces a few more usages of strcpy() and sprintf() when
> copying into a fixed-size buffer (in this case, a buffer of
> NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth
> fixing anyway...

Changing strcpy to strncpy is incorrect.  strncpy should be banned.

--
Peter Eisentraut   peter_e@gmx.net


pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Proposed GUC Variable
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Proposed GUC Variable