Re: [FFmpeg-devel] [PATCH 2/7] avformat/id3v2: Fix double-free on error

2019-12-09 Thread Michael Niedermayer
On Sun, Nov 10, 2019 at 05:07:28AM +0100, Andreas Rheinhardt wrote: > 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 t

Re: [FFmpeg-devel] [PATCH 2/7] avformat/id3v2: Fix double-free on error

2019-12-07 Thread Andreas Rheinhardt
Andreas Rheinhardt: > 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-fr

[FFmpeg-devel] [PATCH 2/7] avformat/id3v2: Fix double-free on error

2019-11-09 Thread Andreas Rheinhardt
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. Bu