You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
Prevent scalefactors from overflowing.
fixes issue351 Originally committed as revision 13591 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -387,7 +387,7 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
|
||||
vmax = v;
|
||||
}
|
||||
/* compute the scale factor index using log 2 computations */
|
||||
if (vmax > 0) {
|
||||
if (vmax > 1) {
|
||||
n = av_log2(vmax);
|
||||
/* n is the position of the MSB of vmax. now
|
||||
use at most 2 compares to find the index */
|
||||
|
Reference in New Issue
Block a user