postgresql/src/backend
Tom Lane 32fdf42cf5 Fix assorted integer-overflow hazards in varbit.c.
bitshiftright() and bitshiftleft() would recursively call each other
infinitely if the user passed INT_MIN for the shift amount, due to integer
overflow in negating the shift amount.  To fix, clamp to -VARBITMAXLEN.
That doesn't change the results since any shift distance larger than the
input bit string's length produces an all-zeroes result.

Also fix some places that seemed inadequately paranoid about input typmods
exceeding VARBITMAXLEN.  While a typmod accepted by anybit_typmodin() will
certainly be much less than that, at least some of these spots are
reachable with user-chosen integer values.

Andreas Seltenreich and Tom Lane

Discussion: <87d1j2zqtz.fsf@credativ.de>
2016-10-14 16:28:34 -04:00
..
access Remove unnecessary int2vector-specific hash function and equality operator. 2016-10-12 14:54:08 -04:00
bootstrap Fix a bunch of places that called malloc and friends with no NULL check. 2016-08-30 18:22:43 -04:00
catalog Fix another bug in merging of inherited CHECK constraints. 2016-10-13 17:05:14 -04:00
commands Drop server support for FE/BE protocol version 1.0. 2016-10-11 12:19:18 -04:00
executor Fix incorrect handling of polymorphic aggregates used as window functions. 2016-10-09 12:49:37 -04:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Clarify the new Red-Black post-order traversal code a bit. 2016-09-04 15:02:06 +03:00
libpq Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
main Repair a bit of pgindent damage. 2016-06-09 18:09:17 -04:00
nodes Add debugging aid "bmsToString(Bitmapset *bms)". 2016-09-16 09:36:24 -04:00
optimizer Disallow pushing volatile quals past set-returning functions. 2016-09-27 18:43:36 -04:00
parser Add ALTER EXTENSION ADD/DROP ACCESS METHOD, and use it in pg_upgrade. 2016-10-02 14:31:28 -04:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Try to find out the actual hugepage size when making a MAP_HUGETLB request. 2016-10-13 15:06:46 -04:00
postmaster Fix handling of pgstat counters for TRUNCATE in a prepared transaction. 2016-10-13 19:46:05 -04:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication libpqwalreceiver needs to link with libintl when using --enable-nls. 2016-10-07 21:12:25 -04:00
rewrite Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Fix fallback implementation of pg_atomic_write_u32(). 2016-10-07 16:55:15 -07:00
tcop Drop server support for FE/BE protocol version 1.0. 2016-10-11 12:19:18 -04:00
tsearch Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
utils Fix assorted integer-overflow hazards in varbit.c. 2016-10-14 16:28:34 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00