mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-03 20:29:28 -05:00
fixup larger than 2**31 case.
git-svn-id: file:///svn/unbound/trunk@4432 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
44eb7bfd25
commit
fa90bbc07a
1 changed files with 5 additions and 1 deletions
|
|
@ -1235,7 +1235,11 @@ subtract_1918(uint32_t a, uint32_t b)
|
|||
if(a < b && b - a < cutoff) {
|
||||
return b-a;
|
||||
}
|
||||
return a-b;
|
||||
if(a > b && a - b > cutoff) {
|
||||
return ((uint32_t)0xffffffff) - (a-b);
|
||||
}
|
||||
/* wrong case, b smaller than a */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** check rrsig dates */
|
||||
|
|
|
|||
Loading…
Reference in a new issue