From: Pauli Date: Sun, 24 Feb 2019 11:26:39 +0000 (+1000) Subject: CID 1442835: Integer Overflow X-Git-Tag: openssl-3.0.0-alpha1~2482 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=71d1b229e9bc230afaea64f03833329f82f6e488;p=oweals%2Fopenssl.git CID 1442835: Integer Overflow Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/8318) --- diff --git a/crypto/property/property_parse.c b/crypto/property/property_parse.c index 2094d38e88..074da51c6b 100644 --- a/crypto/property/property_parse.c +++ b/crypto/property/property_parse.c @@ -301,7 +301,7 @@ static OSSL_PROPERTY_LIST *stack_to_property_list(STACK_OF(PROPERTY_DEFINITION) int i; r = OPENSSL_malloc(sizeof(*r) - + (n == 0 ? 0 : n - 1) * sizeof(r->properties[0])); + + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0])); if (r != NULL) { sk_PROPERTY_DEFINITION_sort(sk);