提交 9cbb3fce 编写于 作者: M 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: NMichael Niedermayer <michaelni@gmx.at>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册