Re: strncpy is not a safe version of strcpy - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: strncpy is not a safe version of strcpy
Date
Msg-id 1384528704.90487.YahooMailNeo@web162903.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: strncpy is not a safe version of strcpy  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: strncpy is not a safe version of strcpy  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> This code should probably be using namecpy().  Note namecpy()
> doesn't memset() after strncpy() and has survived the test of
> time, which strongly suggests that the memset is indeed
> superfluous.

That argument would be more persuasive if I could find any current
usage of the namecpy() function anywhere in the source code.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: GIN improvements part2: fast scan
Next
From: Tom Lane
Date:
Subject: Re: strncpy is not a safe version of strcpy