mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avcodec/prores_raw: reject invalid tile alignment values
Fixes: out of array access
Regression since d8cb567 ("prores_raw: fix tile alignment
issues").
Found-by: amhurtado <amhurtado@pm.me>
Signed-off-by: amhurtado <amhurtado@pm.me>
This commit is contained in:
@@ -427,6 +427,11 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
/* Flags */
|
||||
int flags = bytestream2_get_be16(&gb_hdr);
|
||||
int align = (flags >> 1) & 0x7;
|
||||
if (align > 4) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid tile alignment %d (max 4)\n", align);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Quantization matrix */
|
||||
if (flags & 1)
|
||||
|
||||
Reference in New Issue
Block a user