]> git.ipfire.org Git - thirdparty/curl.git/commit
mprintf: fix integer handling in float precision
authorDaniel Stenberg <daniel@haxx.se>
Mon, 13 Jan 2025 12:24:31 +0000 (13:24 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 13 Jan 2025 22:41:38 +0000 (23:41 +0100)
commit7e32f6568772f6830b42c855b686454c20664843
treed18a34bc07b81da17797c6a11c45c03b7b5ca841
parent97d278fd763ea1a37e6df424c8bfef9145886274
mprintf: fix integer handling in float precision

In the double output function when an extremely large width and
precision is set that reaches the libcurl maximum (325), the handling of
the precision part would do wrong which could lead to bad output.

Also: work-around for single-byte buffer snprintf overflow with mingw.

Extend test 557 to verify.

Coverity CID 1638751.

Closes #15988
lib/mprintf.c
tests/libtest/lib557.c