OSDN Git Service

lavf/img2dec: Initialize a stack variable.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 10 Aug 2014 15:45:05 +0000 (17:45 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 10 Aug 2014 16:20:12 +0000 (18:20 +0200)
Fixes a valgrind warning about using unitialised memory.
Hopefully fixes crashes on several platforms reported through fate.

libavformat/img2dec.c

index b9a1bcf..d70fc75 100644 (file)
@@ -395,7 +395,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt)
         }
 
         if (codec->codec_id == AV_CODEC_ID_NONE) {
-            AVProbeData pd;
+            AVProbeData pd = { 0 };
             AVInputFormat *ifmt;
             uint8_t header[PROBE_BUF_MIN + AVPROBE_PADDING_SIZE];
             int ret;