diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-10-22 20:06:29 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-10-22 20:21:49 +0200 |
commit | 9041e2403d98fdb54206c23bd684a7da6fb63026 (patch) | |
tree | 2d5d6c693ae0b8cbcfcdeebdbb8f4e719d1ff04f /lib | |
parent | 496b4f3c371f19b955d260fb1c8c8ba819f6a7b2 (diff) |
lib: fix uninitialized memory access on handling %J string formats
When parsing the padding size specification of a `J` format, e.g. `%.4J`,
the internally called `atoi()` function might read beyond the end of the
initialized memory within the format buffer, leading to non-deterministic
results.
Avoid overreading the initialized memory by parsing the padding length
manually digit-by-digit.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions