]> git.ipfire.org Git - thirdparty/curl.git/commit
mprintf: reject two kinds of precision for the same argument
authorDaniel Stenberg <daniel@haxx.se>
Mon, 17 Oct 2022 15:56:26 +0000 (17:56 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 18 Oct 2022 06:43:40 +0000 (08:43 +0200)
commitdae84805dede4babaa45370bb9fc611ca2fee6cc
treec74b0ca5fb58443a8cf67f23259f7b19e0ef0e00
parentf6b9971d73dada03b365b4f2dc85a10dba19a354
mprintf: reject two kinds of precision for the same argument

An input like "%.*1$.9999d" would first use the precision taken as an
argument *and* then the precision specified in the string, which is
confusing and wrong. pass1 will now instead return error on this double
use.

Adjusted unit test 1398 to verify

Reported-by: Peter Goodman
Closes #9754
lib/mprintf.c
tests/unit/unit1398.c