Commit 54c7fe6d authored by Janne Grunau's avatar Janne Grunau

raw demuxer: initialize end of partial packets

parent df9b9567
......@@ -45,6 +45,10 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) {
av_free_packet(pkt);
return ret;
} else if (ret < size) {
/* initialize end of packet for partial reads to avoid reading
* uninitialized data on allowed overreads */
memset(pkt->data + ret, 0, FF_INPUT_BUFFER_PADDING_SIZE);
}
pkt->size = ret;
return ret;
......
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