You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avcodec/exif: also copy zero termination for AV_TIFF_STRING
Fixes: out of array read Fixes: 441131173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_DEC_fuzzer-6700429212975104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Leo Izen
parent
041651841a
commit
76645e096f
@@ -993,7 +993,11 @@ static int exif_clone_entry(AVExifEntry *dst, const AVExifEntry *src)
|
||||
EXIF_COPY(dst->value.sbytes, src->value.sbytes);
|
||||
break;
|
||||
case AV_TIFF_STRING:
|
||||
EXIF_COPY(dst->value.str, src->value.str);
|
||||
dst->value.str = av_memdup(src->value.str, src->count+1);
|
||||
if (!dst->value.str) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user