summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_qt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 30deea59f..9ba70ebbb 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -736,12 +736,12 @@ static char *parse_data_atom(const uint8_t *data_atom, uint32_t max_size) {
static const int data_atom_max_version = 0;
const int data_atom_version = data_atom[8];
- if (data_atom_size < 8)
- return NULL; /* too small */
-
if (data_atom_size > max_size)
data_atom_size = max_size;
+ if (data_atom_size < 8)
+ return NULL; /* too small */
+
const size_t alloc_size = data_atom_size - 8 + 1;
char *alloc_str = NULL;