]> git.ipfire.org Git - thirdparty/curl.git/commit
mprintf: make dprintf_formatf never return negative
authorDaniel Stenberg <daniel@haxx.se>
Wed, 13 Jul 2022 21:46:16 +0000 (23:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 17 Jul 2022 21:27:02 +0000 (23:27 +0200)
commit0e48ac1f99a370a8b378e8ca059525feb0bf74d3
tree3e0bd2caacc4dee994879eddc64534cc70652c76
parent8d06af10fb843476988110832e787fa918491109
mprintf: make dprintf_formatf never return negative

This function no longer returns a negative value if the formatting
string is bad since the return value would sometimes be propagated as a
return code from the mprintf* functions and they are documented to
return the length of the output. Which cannot be negative.

Fixes #9149
Closes #9151
Reported-by: yiyuaner on github
lib/mprintf.c
lib/sendf.c
tests/libtest/lib557.c