mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/avpacket: Limit iterations in ff_packet_split_and_drop_side_data()
This avoids scaning beyond what a valid packet can contain Fixes: Timeout Fixes: 541/clusterfuzz-testcase-610189291657625 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d24043e1a2
commit
07339a45a0
|
@ -495,6 +495,8 @@ int ff_packet_split_and_drop_side_data(AVPacket *pkt){
|
|||
if (p - pkt->data < size + 5)
|
||||
return 0;
|
||||
p-= size+5;
|
||||
if (i > AV_PKT_DATA_NB)
|
||||
return 0;
|
||||
}
|
||||
pkt->size = p - pkt->data - size;
|
||||
av_assert0(pkt->size >= 0);
|
||||
|
|
Loading…
Reference in New Issue