1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-15 08:51:38 +02:00

nutdec: Prevent a memory corruption

Chapters do not have an event_flags field.

Bug-Id: CID 1231990
This commit is contained in:
Luca Barbato 2014-10-18 16:58:47 +01:00 committed by Vittorio Giovara
parent 350ed18292
commit 96bfb67747

View File

@ -461,7 +461,7 @@ static int decode_info_header(NUTContext *nut)
int64_t value, end;
char name[256], str_value[1024], type_str[256];
const char *type;
int *event_flags;
int *event_flags = NULL;
AVChapter *chapter = NULL;
AVStream *st = NULL;
AVDictionary **metadata = NULL;
@ -529,6 +529,7 @@ static int decode_info_header(NUTContext *nut)
}
if (metadata && av_strcasecmp(name, "Uses") &&
av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces")) {
if (event_flags)
*event_flags |= metadata_flag;
av_dict_set(metadata, name, str_value, 0);
}