This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
avutil/mathematics: Fix division by 0
Fixes: CID1341571 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0
Michael Niedermayer
10 years ago
parent
8cfa912e25
commit
bc8b1e694c
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
libavutil/mathematics.c
+ 1
- 1
libavutil/mathematics.c
View File
@@ -85,7 +85,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
else {
int64_t ad = a / c;
int64_t a2 = (a % c * b + r) / c;
if (ad >= INT32_MAX && ad > (INT64_MAX - a2) / b)
if (ad >= INT32_MAX &&
b &&
ad > (INT64_MAX - a2) / b)
return INT64_MIN;
return ad * b + a2;
}
Write
Preview
Loading…
Cancel
Save