You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avformat/hls: check return value of new_init_section()
Fixes part of ticket #8931. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@ -842,6 +842,10 @@ static int parse_playlist(HLSContext *c, const char *url,
|
|||||||
ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args,
|
ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args,
|
||||||
&info);
|
&info);
|
||||||
cur_init_section = new_init_section(pls, &info, url);
|
cur_init_section = new_init_section(pls, &info, url);
|
||||||
|
if (!cur_init_section) {
|
||||||
|
ret = AVERROR(ENOMEM);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
cur_init_section->key_type = key_type;
|
cur_init_section->key_type = key_type;
|
||||||
if (has_iv) {
|
if (has_iv) {
|
||||||
memcpy(cur_init_section->iv, iv, sizeof(iv));
|
memcpy(cur_init_section->iv, iv, sizeof(iv));
|
||||||
|
Reference in New Issue
Block a user