]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/bio/bio_print.c: avoid signed int overflow in desc->pos in doapr_outch
authorEugene Syromiatnikov <esyr@openssl.org>
Wed, 10 Sep 2025 08:08:21 +0000 (10:08 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 11 Sep 2025 16:01:51 +0000 (18:01 +0200)
commitcffbccf5eafbc351fc9a9f019810e1dfe04eeb17
tree2a0152143c965446eabd006d6f2e063de51f3d8e
parent7ff5df1014205bc0b45a12163b2e0b31492bf641
crypto/bio/bio_print.c: avoid signed int overflow in desc->pos in doapr_outch

While highly improbable, a signed integer overflow can be triggered
by incrementing desc->pos LLONG_MAX + 1 times.

Fixes: 228ef5f54727 "crypto/bio/bio_print.c: make %n in line with other libc implementations"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28502)
crypto/bio/bio_print.c