You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avsdemux: check for out of bound writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This commit is contained in:
committed by
Janne Grunau
parent
de049a95f4
commit
6de33611c9
@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case AVS_PALETTE:
|
case AVS_PALETTE:
|
||||||
|
if (size - 4 > sizeof(palette))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
ret = avio_read(s->pb, palette, size - 4);
|
ret = avio_read(s->pb, palette, size - 4);
|
||||||
if (ret < size - 4)
|
if (ret < size - 4)
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
Reference in New Issue
Block a user