Re: [HACKERS] version functions (was NT port of PGSQL - success) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] version functions (was NT port of PGSQL - success)
Date
Msg-id 199810091639.MAA12025@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] version functions (was NT port of PGSQL - success)  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
>     No, it is still correct. The version function is there and it
>     returns the compiled in string from version.h.
>
>     But take a look at version.c please. I think  it  should  use
>     memcpy()  or  strncpy()  instead of strcpy(). As it is now it
>     writes the null byte after the palloc'ed area.

Yes, thanks.  Fixed using StrNCpy().

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Open 6.4 items
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] PL patches (one more)