mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-28 05:30:34 +00:00
avcodec/avpacket: zero memory in av_packet_new_side_data()
This ensures that no uninitialized bytes cause non-deterministic behavior. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
04dcdc4640
commit
9cbb3fce59
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user