postgresql/src
Tom Lane 4b44216151 Add defenses against integer overflow in dynahash numbuckets calculations.
The dynahash code requires the number of buckets in a hash table to fit
in an int; but since we calculate the desired hash table size dynamically,
there are various scenarios where we might calculate too large a value.
The resulting overflow can lead to infinite loops, division-by-zero
crashes, etc.  I (tgl) had previously installed some defenses against that
in commit 299d171652, but that covered only one
call path.  Moreover it worked by limiting the request size to work_mem,
but in a 64-bit machine it's possible to set work_mem high enough that the
problem appears anyway.  So let's fix the problem at the root by installing
limits in the dynahash.c functions themselves.

Trouble report and patch by Jeff Davis.
2012-12-11 22:09:34 -05:00
..
backend Add defenses against integer overflow in dynahash numbuckets calculations. 2012-12-11 22:09:34 -05:00
bin Translation updates 2012-12-03 07:51:22 -05:00
include Stamp 8.4.15. 2012-12-03 15:25:45 -05:00
interfaces Stamp 8.4.15. 2012-12-03 15:25:45 -05:00
makefiles Fix PGXS support for building loadable modules on AIX. 2012-10-09 21:04:26 -04:00
pl Back-patch fix and test case for bug #7516. 2012-09-14 11:50:15 -04:00
port Stamp 8.4.15. 2012-12-03 15:25:45 -05:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Prevent passing gmake's environment variables down through pg_regress. 2012-12-01 17:24:11 -05:00
timezone Update time zone data files to tzdata release 2012j. 2012-12-02 16:36:41 -05:00
tools Backpatch "Use the preferred version of xsubpp." 2011-11-28 07:45:48 -05:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:06 +00:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00: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 Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Back-patch creation of tar.bz2 tarball during "make dist". 2011-07-03 16:40:28 -04:00
Makefile.shlib Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00