]> 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)
committerNeil Horman <nhorman@openssl.org>
Tue, 16 Sep 2025 13:41:38 +0000 (09:41 -0400)
commitf7f2874c8a8e15a10486188bbe86fd2142f74a22
tree053612e30031740ce43329840a51b4d5d1063808
parentce7fae1bc31c35abfa6b0c2daa9f889f6b370a0d
apps/storeutl.c: avoid signed integer overflow in indent_printf()

As two arbitrarily large printf return value can trigger function
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>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)
apps/storeutl.c