diff options
author | Andreas Rheinhardt via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> | 2019-03-27 12:18:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-04-05 12:05:47 +0200 |
commit | 18a851aca766ff8c7199c9e0c37d8fa642e41920 (patch) | |
tree | 9b6c5ec2e3888809c0f06c21d0c18ca3d6f0c418 /libavcodec/pthread_frame.c | |
parent | 8e3b01e20ebd82528c3302d6756f3c6dffa4bfb2 (diff) | |
download | ffmpeg-18a851aca766ff8c7199c9e0c37d8fa642e41920.tar.gz |
avformat/matroskadec: Improve length check
The earlier code had three flaws:
1. The case of an unknown-sized element inside a finite-sized element
(which is against the specifications) was not caught.
2. The error message wasn't helpful: It compared the length of the child
with the offset of the end of the parent and claimed that the first
exceeds the latter, although that is not necessarily true.
3. Unknown-sized elements that are not parsed can't be skipped. Given
that according to the Matroska specifications only the segment and the
clusters can be of unknown-size, this is handled by not allowing any
other units to have infinite size whereas the earlier code would seek
back by 1 byte upon encountering an infinite-size element that ought
to be skipped.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pthread_frame.c')
0 files changed, 0 insertions, 0 deletions