]> granicus.if.org Git - postgresql/commit
Ensure that snprintf.c's fmtint() doesn't overflow when printing INT64_MIN.
authorAndres Freund <andres@anarazel.de>
Wed, 3 Oct 2018 20:02:25 +0000 (13:02 -0700)
committerAndres Freund <andres@anarazel.de>
Wed, 3 Oct 2018 20:13:50 +0000 (13:13 -0700)
commit4868e4468590bc32f9c3afed4ec795d6a7732c9d
treed95b4780cb47b4efe4aea8797ec016ff5791cfd8
parent9a3cebeaa7fdc1b0485475eb18121eb06968dc5d
Ensure that snprintf.c's fmtint() doesn't overflow when printing INT64_MIN.

This isn't actually a live bug, as the output happens to be the
same.  But it upsets tools like UBSan, which makes it worthwhile to
fix.

As it's an issue without practical consequences, don't backpatch.

Author: Andres Freund
Discussion: https://postgr.es/m/20180928001121.hhx5n6dsygqxr5wu@alap3.anarazel.de
src/port/snprintf.c