]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix coverity-1604665
authorNeil Horman <nhorman@openssl.org>
Mon, 15 Jul 2024 19:59:14 +0000 (15:59 -0400)
committerTomas Mraz <tomas@openssl.org>
Wed, 17 Jul 2024 07:50:55 +0000 (09:50 +0200)
commit842959a0af1e661ee86e6e8327bab24143fa5f78
tree5f8b78c50113a23284feddaf2845f7f43f33d4a6
parentc45adff74bac367cf7a835cd42ece3f538c6bf40
Fix coverity-1604665

Coverity issued an error in the opt_uintmax code, detecting a potential
overflow on a cast to ossl_intmax_t

Looks like it was just a typo, casting m from uintmax_t to ossl_intmax_t

Fix it by correcting the cast to be ossl_uintmax_t, as would be expected

Theres also some conditionals that seem like they should be removed, but
I'll save that for later, as there may be some corner cases in which
ossl_uintmax_t isn't equal in size to uintmax_t..maybe.

Fixes openssl/private#567

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24897)

(cherry picked from commit a753547eefc9739f341824a0cb0642afe7a06fcc)
apps/lib/opt.c