diff options
author | wm4 <nfxjfg@googlemail.com> | 2014-12-06 16:53:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 23:04:23 +0100 |
commit | f7b536665706b5cb941b15abafd28f67ae2b0604 (patch) | |
tree | 40d97e7221ecde5667e26ad895414694d526a406 /libavcodec/ass_split.h | |
parent | 542332e523cd5c055bd9a97a055008f3342b4edc (diff) | |
download | ffmpeg-f7b536665706b5cb941b15abafd28f67ae2b0604.tar.gz |
avformat/matroskadec: fix handling of recursive SeekHead elements
When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)
Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.
This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.
Fixes ticket #4162.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6551acab6877addae815decd02aeca33ba4990c8)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ass_split.h')
0 files changed, 0 insertions, 0 deletions