]> git.sesse.net Git - ffmpeg/commitdiff
10l : make sure probe buffer is large enough.
authorJai Menon <jmenon86@gmail.com>
Thu, 17 Dec 2009 13:05:37 +0000 (13:05 +0000)
committerJai Menon <jmenon86@gmail.com>
Thu, 17 Dec 2009 13:05:37 +0000 (13:05 +0000)
Originally committed as revision 20889 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/tta.c

index 9d0af2b7e2e3319da273c7466a11fff0771cd124..e5b9e5f4edfa52aa7e61cf8190f1ac42d84e2ba0 100644 (file)
@@ -35,6 +35,9 @@ static int tta_probe(AVProbeData *p)
     if (ff_id3v2_match(d))
         d += ff_id3v2_tag_len(d);
 
+    if (d - p->buf >= p->buf_size)
+        return 0;
+
     if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
         return 80;
     return 0;