to_char(): prevent accesses beyond the allocated buffer
authorBruce Momjian <bruce@momjian.us>
Mon, 2 Feb 2015 15:00:44 +0000 (10:00 -0500)
committerBruce Momjian <bruce@momjian.us>
Mon, 2 Feb 2015 15:00:51 +0000 (10:00 -0500)
commit037529a11c96a09c85b8bbc443f8301067c0ef22
tree8fb6fdf370b8fb4d621a26f767ba6b330d47d0e9
parent544cf245bdf1080e80cb6d462846b53b941ee316
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
src/backend/utils/adt/formatting.c