1
0
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:
Michael Niedermayer
2025-08-27 15:00:56 +02:00
committed by Leo Izen
parent 041651841a
commit 76645e096f

View File

@@ -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;
}