aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-20 16:16:51 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-27 07:20:58 +0100
commit4e7e2e1bd3cedc85decb7a1c2c1bb5e56d7d65cc (patch)
tree4a4cee62ad9ed058094a1b12b60a7f42e87e8e7d /doc/examples
parentffb0cad8f9d6ca00cc0959555e4f5879bbc1d241 (diff)
downloadffmpeg-4e7e2e1bd3cedc85decb7a1c2c1bb5e56d7d65cc.tar.gz
avformat/tedcaptionsdec: Fix leak of AVBPrint upon error
The tedcaptions demuxer uses an AVBPrint whose string is not restricted to its internal buffer; it therefore needs to be cleaned up, yet this is not done on error, as parse_file() returned simply returned directly. This is fixed by going to fail first in such cases. Furthermore, there is also a second way how this string can leak: By having more than one subtitle per subtitle block, as the new one simply overwrites the old one in this case as the AVBPrint is initialized each time upon encountering a subtitle line. The code has been modified to simply append the new subtitle to the old one, so that the old one can't leak any more. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 9f7e592df27bd96bdffae173e3462d0438aea120)
Diffstat (limited to 'doc/examples')
0 files changed, 0 insertions, 0 deletions