https://github.com/postgres/postgres
Revision 2a0abe10f3899d5b802f9df6a7ceffc72f513f16 authored by Tom Lane on 17 January 2011, 17:38:52 UTC, committed by Tom Lane on 17 January 2011, 17:41:01 UTC
If the slice to be assigned to was before the existing array lower bound
(requiring at least one null element to spring into existence to fill the
gap), the code miscalculated how many entries needed to be copied from
the old array's null bitmap.  This could result in trashing the array's
data area (as seen in bug #5840 from Karsten Loesing), or worse.

This has been broken since we first allowed the behavior of assigning to
non-adjacent slices, in 8.2.  Back-patch to all affected versions.
1 parent ebbf741
History
Tip revision: 2a0abe10f3899d5b802f9df6a7ceffc72f513f16 authored by Tom Lane on 17 January 2011, 17:38:52 UTC
Fix miscalculation of itemsafter in array_set_slice().
Tip revision: 2a0abe1
File Mode Size
config
contrib
doc
src
.gitignore -rw-r--r-- 233 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 3.7 KB
Makefile -rw-r--r-- 1.4 KB
README -rw-r--r-- 2.0 KB
README.git -rw-r--r-- 820 bytes
aclocal.m4 -rw-r--r-- 445 bytes
configure -rwxr-xr-x 694.3 KB
configure.in -rw-r--r-- 47.2 KB

README

back to top