postgresql/src
Tom Lane 9a9473f3cc Prevent using strncpy with src == dest in TupleDescInitEntry.
The C and POSIX standards state that strncpy's behavior is undefined when
source and destination areas overlap.  While it remains dubious whether any
implementations really misbehave when the pointers are exactly equal, some
platforms are now starting to force the issue by complaining when an
undefined call occurs.  (In particular OS X 10.9 has been seen to dump core
here, though the exact set of circumstances needed to trigger that remain
elusive.  Similar behavior can be expected to be optional on Linux and
other platforms in the near future.)  So tweak the code to explicitly do
nothing when nothing need be done.

Back-patch to all active branches.  In HEAD, this also lets us get rid of
an exception in valgrind.supp.

Per discussion of a report from Matthias Schmitt.
2013-10-28 20:49:24 -04:00
..
backend Prevent using strncpy with src == dest in TupleDescInitEntry. 2013-10-28 20:49:24 -04:00
bin Ignore SIGSYS during initdb. 2013-10-24 21:51:30 -04:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Modify dynamic shared memory code to use Size rather than uint64. 2013-10-28 12:12:06 -04:00
interfaces Improve pqexpbuffer.c to use modern vsnprintf implementations efficiently. 2013-10-25 17:42:26 -04:00
makefiles Ensure installation dirs are built before contents are installed (v2) 2013-09-30 10:17:30 -04:00
pl Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
port Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Add large object functions catering to SQL callers. 2013-10-27 22:56:54 -04:00
timezone Update time zone data files to tzdata release 2013d. 2013-09-02 15:06:21 -04:00
tools Prevent using strncpy with src == dest in TupleDescInitEntry. 2013-10-28 20:49:24 -04:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Switch dependency order of libpgcommon and libpgport 2013-10-17 22:02:35 -04:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00