Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-04 02:44:32 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-07 17:27:00 +0300
commitc6c36aa97a1e5bf890c55fb4e083699958079940 (patch)
tree2054c96996e65881e6278e8d3f9a2196d9099eb6 /libavformat
parent94fc589f8e59680a99fa62df025d1473ecf03b2d (diff)
avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value()
Fixes: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffff Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5670607746891776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 59328aabd2c789ae053e18a62a20a7addfd4d069) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index bc07000e15..4067d55fa1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4962,7 +4962,7 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
key_len = ptr - key;
callback_get_buf(context, key, key_len, &dest, &dest_len);
- dest_end = dest + dest_len - 1;
+ dest_end = dest ? dest + dest_len - 1 : NULL;
if (*ptr == '\"') {
ptr++;