qtdemux: prevent reading past avc1 atom when parsing
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 11 Aug 2010 09:17:18 +0000 (11:17 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 11 Aug 2010 10:58:17 +0000 (12:58 +0200)
... when one of the subatoms has a large/invalid size.

Fixes #626609.

gst/qtdemux/qtdemux.c

index bfe68b02218f04b87550c1d6fd4f2b4acdcd457b..ce1e5abd9d7e11617d04756770ecebe432e1e106 100644 (file)
@@ -5435,8 +5435,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
                 break;
             }
 
-            len -= QT_UINT32 (avc_data);
-            avc_data += QT_UINT32 (avc_data);
+            len -= size + 8;
+            avc_data += size + 8;
           }
 
           break;