1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/libavutil/tests
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
..
.gitignore avutil/tests/.gitignore: Add channel_layout testtool 2022-09-05 02:00:08 +02:00
adler32.c avutil/tests/adler32: Remove unnecessary volatile 2022-01-29 21:26:26 +01:00
aes_ctr.c avutil/avassert: Don't include avutil.h 2022-02-24 12:56:49 +01:00
aes.c
audio_fifo.c avutil/tests/audio_ffio: add missing header 2021-06-13 13:39:57 -03:00
avstring.c
base64.c
blowfish.c
bprint.c Remove unnecessary avassert.h inclusions 2021-07-22 15:02:30 +02:00
camellia.c avutil/log: Don't include avutil.h 2022-02-24 12:56:49 +01:00
cast5.c avutil/log: Don't include avutil.h 2022-02-24 12:56:49 +01:00
channel_layout.c avutil/tests/channel_layout: also test ambisonic layouts in av_channel_layout_subset() 2022-03-25 17:10:39 -03:00
color_utils.c Remove unnecessary libavutil/(avutil|common|internal).h inclusions 2022-02-24 12:56:49 +01:00
cpu_init.c
cpu.c avutil/tests/cpu: add slowgather 2021-12-21 17:52:09 -03:00
crc.c
des.c
dict.c avutil/dict: Error out in case of key == NULL 2022-09-19 23:39:58 +02:00
display.c avutil/display: Don't include avutil.h 2022-02-24 12:56:49 +01:00
encryption_info.c avutil/avassert: Don't include avutil.h 2022-02-24 12:56:49 +01:00
error.c
eval.c
fifo.c lavu/fifo: add a test for _cb functions 2022-02-15 10:16:16 +01:00
file.c
hash.c
hmac.c
hwdevice.c
imgutils.c
integer.c
lfg.c
lls.c
log.c
lzo.c avutil/tests/lzo: remove timer macros 2021-06-13 13:39:57 -03:00
md5.c libavutil/tests/md5: Remove 'volatile workaround' to avoid warnings 2022-06-08 22:24:31 +02:00
murmur3.c
opt.c lavu: support AVChannelLayout AVOptions 2022-03-15 09:42:29 -03:00
parseutils.c
pca.c
pixdesc.c
pixelutils.c Remove unnecessary libavutil/(avutil|common|internal).h inclusions 2022-02-24 12:56:49 +01:00
pixfmt_best.c lavu/pixdesc: favour formats where depth and subsampling exactly match 2022-09-17 15:11:13 -07:00
random_seed.c
rational.c
ripemd.c
sha512.c
sha.c
softfloat.c
tea.c
tree.c
twofish.c avutil/log: Don't include avutil.h 2022-02-24 12:56:49 +01:00
utf8.c
uuid.c avutil/tests/uuid: add uuid tests 2022-06-12 18:34:37 +10:00
xtea.c