diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-10 14:20:58 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-10 21:07:54 +0200 |
commit | 1ead176d874acb489827ace3935fc71e1eea7e0e (patch) | |
tree | 70571d9ad2ac616aa5f50e4327bcc43b76fce081 /libavformat/wsddec.c | |
parent | a5ac81952e8ea3b071190d36a41b7bab4e957f66 (diff) | |
download | ffmpeg-1ead176d874acb489827ace3935fc71e1eea7e0e.tar.gz |
avformat/mpegts: Don't leave context in inconsistent state upon error
Up until now, opening a section filter works as follows: A filter is
opened and (on success) attached to the MpegTSContext. Then a buffer for
said filter is allocated and upon success attached to the section
filter; on error, the filter is simply freed without removing it from
the MpegTSContext, leaving the latter in an inconsistent state. This
leads to use-after-frees lateron.
This commit fixes this by allocating the buffer first; the filter is
only opened if the buffer could be successfully allocated.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/wsddec.c')
0 files changed, 0 insertions, 0 deletions