[FFmpeg-cvslog] flvdec: fix segfault in amf_parse_object() due to NULL key

Justin Ruggles git at videolan.org
Mon Apr 4 00:38:30 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Apr  3 15:18:36 2011 -0400| [deff8a6d3a7020fdda7fdb3f80d0003b5f44279b] | committer: Michael Niedermayer

flvdec: fix segfault in amf_parse_object() due to NULL key

fixes Issue 2674

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=deff8a6d3a7020fdda7fdb3f80d0003b5f44279b
---

 libavformat/flvdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index cbc4461..ccaee92 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;
 



More information about the ffmpeg-cvslog mailing list