aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-31 23:42:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-03-31 23:47:29 +0200
commit1f361124d97cf8b8ce6d3aacb10cdc53706470de (patch)
treea550ff39df17866d36efe5d34a46f950da59e2cb
parent0cc8a62a78b3afa6092b0dca3d2c2bb3bb14668e (diff)
downloadffmpeg-1f361124d97cf8b8ce6d3aacb10cdc53706470de.tar.gz
avformat/img2dec: zero probe buffer
Fixes use of uninitialized memory Fixes valgrind failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/img2dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index d4912410cc..5da123f4e0 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -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;