aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ivfenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-14 21:03:15 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-19 23:39:58 +0200
commit187cd278325ae2fc6d533141e7d6c557b669932a (patch)
tree25c44e91a0a362cd03c01b074f64bb07bbdd3ef9 /libavformat/ivfenc.c
parent32129d64953da1502a200e850ac0a559791824b9 (diff)
downloadffmpeg-187cd278325ae2fc6d533141e7d6c557b669932a.tar.gz
avutil/dict: Error out in case of key == NULL
Up until now, using NULL as key in av_dict_get() on a non-empty AVDictionary would crash; using NULL as key in av_dict_set() would also crash for a non-empty AVDictionary unless AV_DICT_MULTIKEY was set; in case the dictionary was initially empty or AV_DICT_MULTIKEY was set, it was even possible for av_dict_set() to succeed when adding a NULL key, namely when one uses a value != NULL and the AV_DICT_DONT_STRDUP_VAL flag. Using av_dict_get() on such an AVDictionary will usually lead to crashes, though. Fix this by actually checking for key in both functions; error out if they are NULL. While just at it, also stop relying on av_strdup(NULL) to return NULL in av_dict_set(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/ivfenc.c')
0 files changed, 0 insertions, 0 deletions