avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 Oct 2013 15:45:54 +0000 (17:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Dec 2013 00:05:46 +0000 (01:05 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 240fd8c96f59ebe9dcfc4152a1086cd3f63400c0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/avpacket.c

index e276c60..136e4b5 100644 (file)
@@ -377,7 +377,7 @@ int av_packet_split_side_data(AVPacket *pkt){
         for (i=0; ; i++){
             size= AV_RB32(p);
             av_assert0(size<=INT_MAX && p - pkt->data >= size);
-            pkt->side_data[i].data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
+            pkt->side_data[i].data = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
             pkt->side_data[i].size = size;
             pkt->side_data[i].type = p[4]&127;
             if (!pkt->side_data[i].data)