rmdec: stricter error check to avoid theoretical unitialized use
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 20 Oct 2014 13:11:16 +0000 (14:11 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 21 Oct 2014 13:37:48 +0000 (14:37 +0100)
CC: libav-stable@libav.org
Bug-Id: CID 90558

libavformat/rmdec.c

index 40cc357..38fb1ec 100644 (file)
@@ -865,7 +865,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
                     st = s->streams[i];
             }
 
-            if(len<0 || s->pb->eof_reached)
+            if (len <= 0 || s->pb->eof_reached)
                 return AVERROR(EIO);
 
             res = ff_rm_parse_packet (s, s->pb, st, st->priv_data, len, pkt,