]> 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 15:00:27 +0000 (17:00 +0200)
commitc7071dec4df2565eda48be9280eba2c65cd772ff
tree6d3f7c17635bcd444b9e54f536b75780651fe759
parentf6cf2e38c3943528357f0fdf73ff066455cefc21
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)

(cherry picked from commit 61422fd7e084e63f050ceabf1b0debff801f10ab)
apps/storeutl.c