]> git.sesse.net Git - ffmpeg/commit
avformat/id3v2: Fix double-free on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 10 Nov 2019 04:07:28 +0000 (05:07 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 10 Dec 2019 15:09:14 +0000 (16:09 +0100)
commit67d4940a7795aa3afc8d1e624de33b030e0be51e
treee1a58b54c00d95ecac3f1db685a12283a5777401
parente73688eff43727eb79eb344a4def49540d463902
avformat/id3v2: Fix double-free on error

ff_id3v2_parse_priv_dict() uses av_dict_set() with the flags
AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL. In this case both
key and value are freed on error (and owned by the destination
dictionary on success), so that freeing them again on error is a
double-free and therefore forbidden. But it nevertheless happened.

Fixes CID 1452489 and 1452421.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/id3v2.c