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

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

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