demux_edl: limit to 3 parts for fuzzing
There is no need to test huge playlists, 3 elements it enough to test parsing.
This commit is contained in:
1 parent
fec62de298
commit
f07dbb3aef
1 file changed
+8
@@ -320,11 +320,19 @@ static struct tl_root *parse_edl(bstr str, struct mp_log *log)
|
||||
}
|
||||
}
|
||||
mp_assert(root->num_pars);
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
if (root->num_pars > 3)
|
||||
goto error;
|
||||
#endif
|
||||
for (int n = 0; n < root->num_pars; n++) {
|
||||
if (root->pars[n]->num_parts < 1) {
|
||||
mp_err(log, "EDL specifies no segments.'\n");
|
||||
goto error;
|
||||
}
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
if (root->pars[n]->num_parts > 3)
|
||||
goto error;
|
||||
#endif
|
||||
}
|
||||
return root;
|
||||
error:
|
||||
|
||||
Reference in new issue
Block a user