[FFmpeg-devel] [PATCH] Check for invalid VLC code in zeros_left before writing coefficients.

Ronald S. Bultje rsbultje at gmail.com
Sun Dec 9 16:52:33 CET 2012


On Sun, Dec 9, 2012 at 4:05 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
> On Fri, Dec 07, 2012 at 01:09:20PM -0800, Ronald S. Bultje wrote:
>> From: "Ronald S. Bultje" <rsbultje at gmail.com>
>> This prevents an invalid write into coeffs[scantable[-1]] if zeros_left
>> itself was an invalid VLC code (and thus -1).
> scantable[-1] has to be a value between 0 and 255 as its uint8_t
> coeffs is supposed to be at least 256 entries large for exactly that
> reason

Accessing scantable[-1] is no less valid depending on the type of scantable.

But do as you wish.


More information about the ffmpeg-devel mailing list