Don't allow to sync on packets of zero-size length, since these are never
authorRonald S. Bultje <rsbultje@gmail.com>
Sat, 21 Mar 2009 19:19:09 +0000 (19:19 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Sat, 21 Mar 2009 19:19:09 +0000 (19:19 +0000)
valid. See "[PATCH] rmdec.c: prevent zero-length packets" thread.

Originally committed as revision 18118 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rmdec.c

index deccd3b..ebd7fd2 100644 (file)
@@ -534,7 +534,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
                 goto skip;
             }
 
-            if(state > (unsigned)0xFFFF || state < 12)
+            if(state > (unsigned)0xFFFF || state <= 12)
                 continue;
             len=state - 12;
             state= 0xFFFFFFFF;