postgresql/src
Peter Eisentraut 26ec6b5948 Avoid invalid alloc size error in shm_mq
In shm_mq_receive(), a huge payload could trigger an unjustified
"invalid memory alloc request size" error due to the way the buffer
size is increased.

Add error checks (documenting the upper limit) and avoid the error by
limiting the allocation size to MaxAllocSize.

Author: Markus Wanner <markus.wanner@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/3bb363e7-ac04-0ac4-9fe8-db1148755bfa%402ndquadrant.com
2020-10-19 08:52:25 +02:00
..
backend Avoid invalid alloc size error in shm_mq 2020-10-19 08:52:25 +02:00
bin In pg_restore's dump_lo_buf(), work a little harder on error handling. 2020-10-18 12:26:02 -04:00
common Fix compilation warning in unicode_norm.c 2020-10-12 20:34:55 +09:00
fe_utils Standardize the printf format for st_size 2020-09-24 21:04:21 +02:00
include llvmjit: Work around bug in LLVM 3.9 causing crashes after 72559438f9. 2020-10-15 18:17:00 -07:00
interfaces Update the Winsock API version requested by libpq. 2020-10-18 12:56:43 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Fixup some appendStringInfo and appendPQExpBuffer calls 2020-10-15 20:35:17 +13:00
port Minor cleanup for win32stat.c. 2020-10-12 11:13:02 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Improve whitespace 2020-10-19 08:32:53 +02:00
timezone Update time zone data files to tzdata release 2020c. 2020-10-16 21:53:33 -04:00
tools Sync our copy of the timezone library with IANA release tzcode2020c. 2020-10-16 21:40:16 -04:00
tutorial Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Split Makefile symbol CFLAGS_VECTOR into two symbols. 2020-09-06 21:28:16 -04:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00