mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
isomp4: recovery: add sanity check
... on possibly bogus/corrupt input data.
This commit is contained in:
parent
ed94e01231
commit
3137f26544
1 changed files with 7 additions and 0 deletions
|
@ -681,6 +681,13 @@ moov_recov_file_create (FILE * file, GError ** err)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* sanity check */
|
||||||
|
if (moovrf->num_traks > 1024) {
|
||||||
|
g_set_error (err, ATOMS_RECOV_QUARK, ATOMS_RECOV_ERR_PARSING,
|
||||||
|
"Unsupported number of traks");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
/* init the traks */
|
/* init the traks */
|
||||||
moovrf->traks_rd = g_new0 (TrakRecovData, moovrf->num_traks);
|
moovrf->traks_rd = g_new0 (TrakRecovData, moovrf->num_traks);
|
||||||
for (i = 0; i < moovrf->num_traks; i++) {
|
for (i = 0; i < moovrf->num_traks; i++) {
|
||||||
|
|
Loading…
Reference in a new issue