vfprintf-internal: Get rid of alloca.
commit5c37d2065286d3db7b974266a3002bb5747d2e5d
authorJoe Simmons-Talbott <josimmon@redhat.com>
Mon, 31 Jul 2023 19:42:32 +0000 (31 19:42 +0000)
committerJoe Simmons-Talbott <josimmon@redhat.com>
Tue, 1 Aug 2023 12:32:49 +0000 (1 12:32 +0000)
tree2390d4a6e2a70cf55861964af0ac6713482f8c86
parent510fc20d73de12c85823d9996faac74666e9c2e7
vfprintf-internal: Get rid of alloca.

Avoid potential stack overflow from unbounded alloca.  Use the existing
scratch_buffer instead.

Add testcases to exercise the code as suggested by Adhemerval Zanella Netto.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
stdio-common/tst-vfprintf-user-type.c
stdio-common/vfprintf-internal.c