Correct INT_MAX overflow check to UINT_MAX
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
e91cbcfb2c
commit
ce16474d91
1 changed files with 1 additions and 1 deletions
|
@ -901,7 +901,7 @@ static int oid_parse_number(unsigned int *num, const char **p, const char *bound
|
|||
*num = 0;
|
||||
while (*p < bound && **p >= '0' && **p <= '9') {
|
||||
ret = 0;
|
||||
if (*num > (INT_MAX / 10)) {
|
||||
if (*num > (UINT_MAX / 10)) {
|
||||
return MBEDTLS_ERR_ASN1_INVALID_DATA;
|
||||
}
|
||||
*num *= 10;
|
||||
|
|
Loading…
Reference in a new issue