From 0f18a567e67670983681f2a6ae66ea6c3c42b942 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Mon, 22 Jan 2007 17:07:08 +0000 Subject: Must check whether "key" is NULL when parsing flash vars. CVS patchset: 8541 CVS date: 2007/01/22 17:07:08 --- src/demuxers/demux_flv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/demuxers/demux_flv.c b/src/demuxers/demux_flv.c index 0c43b51ab..129fb40fb 100644 --- a/src/demuxers/demux_flv.c +++ b/src/demuxers/demux_flv.c @@ -26,7 +26,7 @@ * For more information on the FLV file format, visit: * http://download.macromedia.com/pub/flash/flash_file_format_specification.pdf * - * $Id: demux_flv.c,v 1.17 2007/01/22 16:25:08 klan Exp $ + * $Id: demux_flv.c,v 1.18 2007/01/22 17:07:08 klan Exp $ */ #ifdef HAVE_CONFIG_H @@ -271,7 +271,7 @@ static int parse_flv_var(demux_flv_t *this, unsigned char *buf, int size, char * lprintf(" got array (%d indices)\n", BE_32(tmp)); num = BE_32(tmp); tmp += 4; - if (!strncmp (key, "times", 5)) { + if (key && !strncmp (key, "times", 5)) { if (this->index) free (this->index); this->index = xine_xmalloc(num*sizeof(flv_index_entry_t)); @@ -285,7 +285,7 @@ static int parse_flv_var(demux_flv_t *this, unsigned char *buf, int size, char * } break; } - if (!strncmp (key, "filepositions", 13)) { + if (key && !strncmp (key, "filepositions", 13)) { if (this->index && this->num_indices == num) { for (num = 0; num < this->num_indices && tmp < end; num++) { if (*tmp++ == FLV_DATA_TYPE_NUMBER) { -- cgit v1.2.3