]> git.ipfire.org Git - thirdparty/openssl.git/commit
Replace unsigned with int
authorJiasheng Jiang <jiasheng@purdue.edu>
Thu, 21 Mar 2024 19:55:34 +0000 (19:55 +0000)
committerTomas Mraz <tomas@openssl.org>
Mon, 25 Mar 2024 16:45:33 +0000 (17:45 +0100)
commitf13ddaab69def0b453b75a8f2deb80e1f1634f42
tree7fd61d7ee09e647bc5925c95ea002f28f59decf1
parent01eaf203856bfbb63051f8ecf56eae2d21132496
Replace unsigned with int

Replace the type of "digest_length" with int to avoid implicit conversion when it is assigned by EVP_MD_get_size().
Otherwise, it may pass the following check and cause the integer overflow error when EVP_MD_get_size() returns negative numbers.
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23922)
demos/digest/EVP_MD_demo.c
demos/digest/EVP_MD_stdin.c