changeset 5193:360f4a07ce5e libavformat

Check offset in flv_probe()
author michael
date Tue, 15 Sep 2009 14:56:09 +0000
parents ef6c4a95acb8
children ead0d47f2fb7
files flvdec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flvdec.c	Tue Sep 15 13:28:14 2009 +0000
+++ b/flvdec.c	Tue Sep 15 14:56:09 2009 +0000
@@ -39,7 +39,7 @@
     const uint8_t *d;
 
     d = p->buf;
-    if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0) {
+    if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0 && AV_RB32(d+5)>8) {
         return AVPROBE_SCORE_MAX;
     }
     return 0;