[FFmpeg-cvslog] rmdec: stricter error check to avoid theoretical unitialized use

Vittorio Giovara git at videolan.org
Tue Oct 21 23:59:26 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Oct 20 14:11:16 2014 +0100| [be42c0b8d57fe2ea769892d102ffd5561dc18709] | committer: Vittorio Giovara

rmdec: stricter error check to avoid theoretical unitialized use

CC: libav-stable at libav.org
Bug-Id: CID 90558

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be42c0b8d57fe2ea769892d102ffd5561dc18709
---

 libavformat/rmdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 40cc357..38fb1ec 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -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,



More information about the ffmpeg-cvslog mailing list