postgresql/src
Tom Lane 13bba02271 Avoid calling memcpy() with a NULL source pointer and count == 0.
As in commit 0a52d378b0, avoid doing something that has undefined
results according to the C standard, even though in practice there does
not seem to be any problem with it.

This fixes two places in numeric.c that demonstrably could call memcpy()
with such arguments.  I looked through that file and didn't see any other
places with similar hazards; this is not to claim that there are not such
places in other files.

Per report from Piotr Stefaniak.  Back-patch to 9.5 which is where the
previous commit was added.  We're more or less setting a precedent that
we will not worry about this type of issue in pre-9.5 branches unless
someone demonstrates a problem in the field.
2015-08-02 15:48:31 -04:00
..
backend Avoid calling memcpy() with a NULL source pointer and count == 0. 2015-08-02 15:48:31 -04:00
bin Fix calculation of latency of pgbench backslash commands. 2015-07-30 14:50:51 +03:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Fix incorrect order of lock file removal and failure to close() sockets. 2015-08-02 14:55:03 -04:00
interfaces Improve handling of out-of-memory in libpq. 2015-07-07 18:44:59 +03:00
makefiles Clean up Makefile.win32 "-I" flag additions. 2015-07-30 20:48:46 -04:00
pl Fix (some of) pltcl memory usage 2015-07-20 14:10:07 +02:00
port Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:14 -04:00
test Fix some planner issues with degenerate outer join clauses. 2015-08-01 20:57:41 -04:00
timezone Update time zone data files to tzdata release 2015d. 2015-05-15 19:35:29 -04:00
tools MSVC: Revert most 9.5 changes to pre-9.5 vcregress.pl tests. 2015-07-29 22:48:56 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Consolidate makefile code for setting top_srcdir, srcdir and VPATH. 2015-07-30 20:48:41 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00