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

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

Commit: c2e2ad79890faa2429a8dab4a34a509ef79c05f9
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-08-21T02:40:26Z
Releases: 8.0.14
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