]> git.ipfire.org Git - thirdparty/openssl.git/commit
apps/storeutl.c: avoid signed integer overflow in indent_printf()
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 15 Sep 2025 03:14:09 +0000 (05:14 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 25 Sep 2025 14:59:52 +0000 (16:59 +0200)
commit61422fd7e084e63f050ceabf1b0debff801f10ab
tree0834c4f20d76e8452196d62ba10bd22d7bc5fc42
parenta53013196cc7d12f80520d4dfea55744f46646a7
apps/storeutl.c: avoid signed integer overflow in indent_printf()

As two arbitrarily large printf return values can trigger signed integer
overflow, rewrite the return value handling to avoid it.

Fixes: fb43ddceda79 "Add a recursive option to 'openssl storeutl'"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665428
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28648)
apps/storeutl.c