diff tta.c @ 5468:4201c086a746 libavformat

10l : make sure probe buffer is large enough.
author jai_menon
date Thu, 17 Dec 2009 13:05:37 +0000
parents af08ed2b60b8
children 536e5527c1e0
line wrap: on
line diff
--- a/tta.c	Wed Dec 16 21:24:04 2009 +0000
+++ b/tta.c	Thu Dec 17 13:05:37 2009 +0000
@@ -35,6 +35,9 @@
     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;