Commit 07339a45 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent d24043e1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment