diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-01-07 14:55:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-08 01:32:26 +0100 |
commit | bb20f3dd730689c3a99f7820cff8b74b06992fff (patch) | |
tree | c1e21a508bcc6ea80a3ab85e6e2049c7cbf22850 /libavformat | |
parent | 3fd68fd955e45ecdb2d96241c9d479a68a0ad982 (diff) | |
download | ffmpeg-bb20f3dd730689c3a99f7820cff8b74b06992fff.tar.gz |
avformat/fitsdec: Fix potential leak of string in AVBPrint
by freeing it a bit earlier.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/fitsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c index c7d1edec60..30e34fc4d5 100644 --- a/libavformat/fitsdec.c +++ b/libavformat/fitsdec.c @@ -157,11 +157,11 @@ static int fits_read_packet(AVFormatContext *s, AVPacket *pkt) av_bprint_init(&avbuf, FITS_BLOCK_SIZE, AV_BPRINT_SIZE_UNLIMITED); while ((ret = is_image(s, fits, &header, &avbuf, &size)) == 0) { + av_bprint_finalize(&avbuf, NULL); pos = avio_skip(s->pb, size); if (pos < 0) return pos; - av_bprint_finalize(&avbuf, NULL); av_bprint_init(&avbuf, FITS_BLOCK_SIZE, AV_BPRINT_SIZE_UNLIMITED); avpriv_fits_header_init(&header, STATE_XTENSION); } |