• Andreas Rheinhardt's avatar
    avformat/matroskadec: Sanitize SeekHead entries · 7c243eec
    Andreas Rheinhardt authored
    A Seek element in a Matroska SeekHead should contain a SeekID and a
    SeekPosition element and upon reading, they should be sanitized:
    
    Given that IDs are restricted to 32 bit, longer SeekIDs should be treated
    as invalid. Instead currently the lower 32 bits have been used.
    
    For SeekPosition, no checks were performed for the element to be
    present and if present, whether it was excessively large (i.e. the
    absolute file position described by it exceeding INT64_MAX). The
    SeekPosition element had a default value of -1 which means that a check
    seems to have been intended; but it was not implemented. This commit adds
    a check for overflow to the calculation of the absolute file position of
    the referenced level 1 elements.
    Using -1 (i.e. UINT64_MAX) as default value for SeekPosition implies that
    a Seek element without SeekPosition will run afoul of this check.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    7c243eec
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...
.mailmap 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...