Commit 1f361124 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/img2dec: zero probe buffer

Fixes use of uninitialized memory
Fixes valgrind failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0cc8a62a
......@@ -361,6 +361,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
ret = avio_read(f[0], header, PROBE_BUF_MIN);
if (ret < 0)
return ret;
memset(header + ret, 0, sizeof(header) - ret);
avio_skip(f[0], -ret);
pd.buf = header;
pd.buf_size = 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