[FFmpeg-devel] [PATCH] lavc/flacdec: Increase residual limit from INT_MAX to UINT_MAX

Martijn van Beurden mvanb1 at gmail.com
Tue Apr 5 19:26:09 EEST 2022


Op di 5 apr. 2022 18:04 schreef Andreas Rheinhardt <
andreas.rheinhardt at outlook.com>:

>
> Wouldn't it be possible to use unsigned for real_limit?
>

The limit is passed to get_ur_golomb_jpegls which takes int. In that
function, the limit is subtracted from, and the function is used by quite a
few other codecs, so changing it seems risky.

Besides creating a cleaner flacdec.c, it wouldn't achieve much either. For
tmp = 0 or tmp = 1, reaching this limit means the file contains a INT_MAX
or INT_MAX/2 unary coded, so a single symbol of either 2GiB or 1GiB in size.

>


More information about the ffmpeg-devel mailing list