mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/shorten: Check skip_bytes()
Fixes CID1210526 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c347f75d6b
commit
d201becfc0
@ -370,6 +370,11 @@ static int read_header(ShortenContext *s)
|
|||||||
s->nmean = get_uint(s, 0);
|
s->nmean = get_uint(s, 0);
|
||||||
|
|
||||||
skip_bytes = get_uint(s, NSKIPSIZE);
|
skip_bytes = get_uint(s, NSKIPSIZE);
|
||||||
|
if ((unsigned)skip_bytes > get_bits_left(&s->gb)/8) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "invalid skip_bytes: %d\n", skip_bytes);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < skip_bytes; i++)
|
for (i = 0; i < skip_bytes; i++)
|
||||||
skip_bits(&s->gb, 8);
|
skip_bits(&s->gb, 8);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user