diff options
author | Pauli <paul.dale@oracle.com> | 2019-02-24 21:26:39 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-02-24 21:26:39 +1000 |
commit | 71d1b229e9bc230afaea64f03833329f82f6e488 (patch) | |
tree | 4b8b532421a751f8a2f94aef8919602bc43312c9 /crypto/property | |
parent | 909f2e59832f041cdd0be538f9225f7f3061604a (diff) |
CID 1442835: Integer Overflow
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/8318)
Diffstat (limited to 'crypto/property')
-rw-r--r-- | crypto/property/property_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |