mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
typefindfunctions: Bail out on huge EBML chunks
We can't handle/store more than guint32 anyway
This commit is contained in:
parent
38ba954e82
commit
2657fc1fdd
1 changed files with 5 additions and 0 deletions
|
@ -4388,6 +4388,11 @@ ebml_parse_chunk (GstTypeFind * tf, DataScanCtx * ctx, guint32 chunk_id,
|
|||
SPACES + sizeof (SPACES) - 1 - (2 * depth), id, element_size,
|
||||
hdr_len + element_size);
|
||||
|
||||
if (element_size >= G_MAXUINT32) {
|
||||
GST_DEBUG ("Chunk too big for typefinding");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!data_scan_ctx_ensure_data (tf, &c, element_size)) {
|
||||
GST_DEBUG ("not enough data");
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue