Обсуждение: pgsql: port/snprintf(): fix overflow and do padding

Поиск
Список
Период
Сортировка

pgsql: port/snprintf(): fix overflow and do padding

От
Bruce Momjian
Дата:
port/snprintf():  fix overflow and do padding

Prevent port/snprintf() from overflowing its local fixed-size
buffer and pad to the desired number of digits with zeros, even
if the precision is beyond the ability of the native sprintf().
port/snprintf() is only used on systems that lack a native
snprintf().

Reported by Bruce Momjian. Patch by Tom Lane.    Backpatch to all
supported versions.

Security: CVE-2015-0242

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c6c6aa288c7d2835f587e89847c7355d43e548e3

Modified Files
--------------
src/port/snprintf.c |   69 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 62 insertions(+), 7 deletions(-)