aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-20 16:16:51 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-20 16:58:17 +0200
commit9f7e592df27bd96bdffae173e3462d0438aea120 (patch)
treedfe21c1ee3925dc6b7a5c37f681b37161c58f0ca /libavformat/mov.c
parentb0dee629da132f31934d58104c209d1ab3c1cb79 (diff)
downloadffmpeg-9f7e592df27bd96bdffae173e3462d0438aea120.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>
Diffstat (limited to 'libavformat/mov.c')
0 files changed, 0 insertions, 0 deletions