]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix possible "invalid memory alloc request size" failure in nodeHash.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Oct 2015 18:16:59 +0000 (14:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 4 Oct 2015 18:17:20 +0000 (14:17 -0400)
commitfd3e3cf500de7f8f625744fbd8a413b27f500abe
tree8af1804d2a519cb5e8fddaeed0bb747bca71c3b3
parentfd519c1701ad509dfbe7b8698ddf5b9d11432da8
Fix possible "invalid memory alloc request size" failure in nodeHash.c.

Limit the size of the hashtable pointer array to not more than
MaxAllocSize.  We've seen reports of failures due to this in HEAD/9.5,
and it seems possible in older branches as well.  The change in
NTUP_PER_BUCKET in 9.5 may have made the problem more likely, but
surely it didn't introduce it.

Tomas Vondra, slightly modified by me
src/backend/executor/nodeHash.c