mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix for #637: fix integer overflow checks in sldns_str2period.
This commit is contained in:
parent
debe5c665f
commit
b202b0874c
2 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
3 March 2022: Wouter
|
3 March 2022: Wouter
|
||||||
- Fix #637: Integer Overflow in sldns_str2period function.
|
- Fix #637: Integer Overflow in sldns_str2period function.
|
||||||
|
- Fix for #637: fix integer overflow checks in sldns_str2period.
|
||||||
|
|
||||||
2 March 2022: George
|
2 March 2022: George
|
||||||
- Merge PR #632 from scottrw93: Match cnames in ipset.
|
- Merge PR #632 from scottrw93: Match cnames in ipset.
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,7 @@ sldns_str2period(const char *nptr, const char **endptr, int* overflow)
|
||||||
case '7':
|
case '7':
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
if(i > maxint/10 || i > maxint - (**endptr - '0')) {
|
if(i > maxint/10 || i*10 > maxint - (**endptr - '0')) {
|
||||||
*overflow = 1;
|
*overflow = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue