1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00
FFmpeg/libavutil
Andreas Rheinhardt 187cd27832 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>
2022-09-19 23:39:58 +02:00
..
2022-09-06 05:42:32 +02:00
2021-04-27 10:43:13 -03:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2022-09-13 16:50:43 -03:00
2022-02-24 12:56:49 +01:00
2022-03-10 16:45:48 -03:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2021-04-27 10:43:13 -03:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2022-09-15 20:56:23 +05:30
2021-07-22 14:34:31 +02:00
2022-02-24 12:56:49 +01:00
2021-07-21 16:35:27 +02:00
2021-07-21 16:35:27 +02:00
2021-10-02 17:13:57 +02:00
2021-07-22 14:34:31 +02:00
2022-05-26 17:18:23 +08:00
2021-04-27 10:43:13 -03:00
2021-07-22 14:34:31 +02:00
2022-03-15 09:42:29 -03:00
2020-05-23 15:51:44 +02:00
2020-05-23 15:51:44 +02:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2021-07-22 14:34:31 +02:00
2022-02-24 12:56:49 +01:00
2022-09-13 16:50:43 -03:00
2021-07-22 14:34:31 +02:00
2021-11-19 16:47:28 +01:00