Fix potential access-off-the-end-of-memory in varbit_out(): it fetched the

Tom Lane <tgl@sss.pgh.pa.us>

Commit: c40f60db3f8cc482b91be9a641ef69ff58666070
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-08-21T02:40:12Z
Releases: 8.2.5
Fix potential access-off-the-end-of-memory in varbit_out(): it fetched the
byte after the last full byte of the bit array, regardless of whether that
byte was part of the valid data or not.  Found by buildfarm testing.
Thanks to Stefan Kaltenbrunner for nailing down the cause.

Files

PathChange+/−
src/backend/utils/adt/varbit.c modified +11 −6