to_char(): prevent accesses beyond the allocated buffer

Bruce Momjian <bruce@momjian.us>

Commit: 037529a11c96a09c85b8bbc443f8301067c0ef22
Author: Bruce Momjian <bruce@momjian.us>
Date: 2015-02-02T15:00:51Z
Releases: 9.1.15
to_char():  prevent accesses beyond the allocated buffer

Previously very long field masks for floats could access memory
beyond the existing buffer allocated to hold the result.

Reported by Andres Freund and Peter Geoghegan.	Backpatch to all
supported versions.

Security: CVE-2015-0241

Files

PathChange+/−
src/backend/utils/adt/formatting.c modified +3 −1