Commit 96bfb677 authored by Luca Barbato's avatar Luca Barbato Committed by Vittorio Giovara

nutdec: Prevent a memory corruption

Chapters do not have an event_flags field.

Bug-Id: CID 1231990
parent 350ed182
...@@ -461,7 +461,7 @@ static int decode_info_header(NUTContext *nut) ...@@ -461,7 +461,7 @@ static int decode_info_header(NUTContext *nut)
int64_t value, end; int64_t value, end;
char name[256], str_value[1024], type_str[256]; char name[256], str_value[1024], type_str[256];
const char *type; const char *type;
int *event_flags; int *event_flags = NULL;
AVChapter *chapter = NULL; AVChapter *chapter = NULL;
AVStream *st = NULL; AVStream *st = NULL;
AVDictionary **metadata = NULL; AVDictionary **metadata = NULL;
...@@ -529,6 +529,7 @@ static int decode_info_header(NUTContext *nut) ...@@ -529,6 +529,7 @@ static int decode_info_header(NUTContext *nut)
} }
if (metadata && av_strcasecmp(name, "Uses") && if (metadata && av_strcasecmp(name, "Uses") &&
av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) { av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) {
if (event_flags)
*event_flags |= metadata_flag; *event_flags |= metadata_flag;
av_dict_set(metadata, name, str_value, 0); av_dict_set(metadata, name, str_value, 0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment