Commit 9cbb3fce authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/avpacket: zero memory in av_packet_new_side_data()

This ensures that no uninitialized bytes cause non-deterministic behavior.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 04dcdc46
......@@ -309,7 +309,7 @@ uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
if (!pkt->side_data)
return NULL;
pkt->side_data[elems].data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
pkt->side_data[elems].data = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!pkt->side_data[elems].data)
return NULL;
pkt->side_data[elems].size = size;
......
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