• Andreas Rheinhardt via ffmpeg-devel's avatar
    avformat/matroskadec: Improve length check · 18a851ac
    Andreas Rheinhardt via ffmpeg-devel authored
    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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@googlemail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    18a851ac
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...