]> git.sesse.net Git - ffmpeg/commit
avformat/mov: Fix extended atom size buffer length check
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Thu, 18 Mar 2021 15:26:54 +0000 (15:26 +0000)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sun, 21 Mar 2021 14:14:36 +0000 (14:14 +0000)
commit85f397c828c8766d411d7bfc773c1241057e9d30
tree8e7c5c1d2e4c6e40194decb6b006cb4e68480646
parent75fd3e15190cf72ffcfa15f0fb00f1d9a7ac5b6e
avformat/mov: Fix extended atom size buffer length check

When extended atom size support was added to probing in
fec4a2d232d7ebf6d1084fb568d4d84844f25abc, the buffer
size check was backwards, but probing continued to work
because there was no minimum size check yet, so despite
size being 1 on these atoms, and failing to read the 64-bit
size, the tag was still correctly read.

When 0b78016b2d7c36b32d07669c0c86bc4b4225ec98 introduced a
minimum size check, this exposed the bug, and broke probing
any files with extended atom sizes, such as entirely valid
large files that start whith mdat atoms.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavformat/mov.c