flvdec: fix segfault in amf_parse_object() due to NULL key
authorJustin Ruggles <justin.ruggles@gmail.com>
Sun, 3 Apr 2011 19:18:36 +0000 (15:18 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 Apr 2011 22:35:58 +0000 (00:35 +0200)
fixes Issue 2674

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvdec.c

index cbc4461..ccaee92 100644 (file)
@@ -202,7 +202,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
         case AMF_DATA_TYPE_OBJECT: {
             unsigned int keylen;
 
-            if (!strcmp(KEYFRAMES_TAG, key) && depth == 1)
+            if (key && !strcmp(KEYFRAMES_TAG, key) && depth == 1)
                 if (parse_keyframes_index(s, ioc, vstream, max_pos) < 0)
                     return -1;