mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-09 08:50:31 +00:00
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> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| adler32.c | ||
| aes.c | ||
| aes_ctr.c | ||
| audio_fifo.c | ||
| avstring.c | ||
| base64.c | ||
| blowfish.c | ||
| bprint.c | ||
| camellia.c | ||
| cast5.c | ||
| channel_layout.c | ||
| color_utils.c | ||
| cpu.c | ||
| cpu_init.c | ||
| crc.c | ||
| des.c | ||
| dict.c | ||
| display.c | ||
| encryption_info.c | ||
| error.c | ||
| eval.c | ||
| fifo.c | ||
| file.c | ||
| hash.c | ||
| hmac.c | ||
| hwdevice.c | ||
| imgutils.c | ||
| integer.c | ||
| lfg.c | ||
| lls.c | ||
| log.c | ||
| lzo.c | ||
| md5.c | ||
| murmur3.c | ||
| opt.c | ||
| parseutils.c | ||
| pca.c | ||
| pixdesc.c | ||
| pixelutils.c | ||
| pixfmt_best.c | ||
| random_seed.c | ||
| rational.c | ||
| ripemd.c | ||
| sha.c | ||
| sha512.c | ||
| softfloat.c | ||
| tea.c | ||
| tree.c | ||
| twofish.c | ||
| utf8.c | ||
| uuid.c | ||
| xtea.c | ||