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

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

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