summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index a04cdaf530..5ce3228166 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -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);