Avoid divide by 0 exception

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19310)
This commit is contained in:
Kelvin Lee 2022-09-30 18:26:37 +10:00 committed by Pauli
parent b85d53c167
commit 3189e12733
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@
type b, \ type b, \
int *err) \ int *err) \
{ \ { \
if (a > max / b) \ if (b != 0 && a > max / b) \
*err |= 1; \ *err |= 1; \
return a * b; \ return a * b; \
} }