avformat/hls: check return value of new_init_section()
Fixes part of ticket #8931. Fixes: CVE-2023-6603 Signed-off-by: Marton Balint <cus@passwd.hu> (cherry picked from commit28c83584e8) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commite3e479d077) Signed-off-by: Carlos Henrique Lima Melara <charlesmelara@riseup.net>
This commit is contained in:
committed by
James Almer
parent
55774a0f19
commit
a3acba8949
@@ -886,6 +886,10 @@ static int parse_playlist(HLSContext *c, const char *url,
|
||||
ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args,
|
||||
&info);
|
||||
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;
|
||||
if (has_iv) {
|
||||
memcpy(cur_init_section->iv, iv, sizeof(iv));
|
||||
|
||||
Reference in New Issue
Block a user