• Matt Wolenetz's avatar
    avformat/mov: Initialize a potential gap in ctts_data in mov_build_index · 133ddd38
    Matt Wolenetz authored
    mov_read_ctts ignores ctts entries having count <= 0. Generally, the
    aggregate of all ctts entries' count fields resulting from mov_read_ctts
    can be less than the corresponding sample_count.
    
    mov_build_index attempts to normalize any existing ctts_data counts to
    be 1, to make a 1-1 mapping of a ctts_data entry to a sample.
    
    That 1-1 mapping left a tail of uninitialized ctts_data entries when the
    aggregate, normalized ctts_count < sample_count.
    
    Even more generally, later usage of ctts_data may depend on the entire
    ctts_allocated_size having been initialized.
    
    This change memsets the entire allocation of the normalized ctts_data in
    mov_build_index, to prevent use of uninitialized data later.
    
    BUG=816787
    
    Change-Id: I7fd7db255e3aeed076ee32c90cb2df211741c052
    Reviewed-on: https://chromium-review.googlesource.com/947110Reviewed-by: 's avatarXiaohan Wang <xhwang@chromium.org>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    133ddd38
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...