mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-08 16:54:03 +02:00
avcodec/ffv1dec: Limit golomb rice coded slices to width 8M
This limit is possibly not reachable due to other restrictions on buffers but the decoder run table is too small beyond this, so explicitly check for it. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b4431399ec1e10afff458cf1ffae2a75987d725a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8063b5e289
commit
7fe75d51fe
@ -185,6 +185,9 @@ static int decode_slice_header(FFV1Context *f, FFV1Context *fs)
|
||||
|| (unsigned)fs->slice_y + (uint64_t)fs->slice_height > f->height)
|
||||
return -1;
|
||||
|
||||
if (fs->ac == AC_GOLOMB_RICE && fs->slice_width >= (1<<23))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (i = 0; i < f->plane_count; i++) {
|
||||
PlaneContext * const p = &fs->plane[i];
|
||||
int idx = get_symbol(c, state, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user