mirror of https://github.com/nginx/nginx
fix potential integer overflow
Multiplication of two `uint32_t` might overflow before it is widened to `uint64_t`
This commit is contained in:
parent
a144d828cb
commit
816a42c4f0
|
|
@ -2460,7 +2460,7 @@ found:
|
|||
start_sample -= key_prefix;
|
||||
|
||||
while (rest < key_prefix) {
|
||||
trak->prefix += rest * duration;
|
||||
trak->prefix += (uint64_t) rest * duration;
|
||||
key_prefix -= rest;
|
||||
|
||||
entry--;
|
||||
|
|
@ -2471,7 +2471,7 @@ found:
|
|||
rest = count;
|
||||
}
|
||||
|
||||
trak->prefix += key_prefix * duration;
|
||||
trak->prefix += (uint64_t) key_prefix * duration;
|
||||
trak->duration += trak->prefix;
|
||||
rest -= key_prefix;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue