From deff8a6d3a7020fdda7fdb3f80d0003b5f44279b Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 3 Apr 2011 15:18:36 -0400 Subject: [PATCH] flvdec: fix segfault in amf_parse_object() due to NULL key fixes Issue 2674 Signed-off-by: Michael Niedermayer --- libavformat/flvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index cbc44618f3..ccaee9247a 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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;