This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 273b161a98 avcodec/exif: skip EXIF entries with invalid TIFF field
type 0
273b161a98 is described below
commit 273b161a98bcd918b47397b6a3e1bcc46aefcf67
Author: Hassan Hany <[email protected]>
AuthorDate: Wed Feb 4 02:47:57 2026 +0200
Commit: Leo Izen <[email protected]>
CommitDate: Sun Feb 8 19:56:20 2026 +0000
avcodec/exif: skip EXIF entries with invalid TIFF field type 0
EXIF IFD entries with TIFF field type 0 are invalid per the specification.
Without a check, exif_read_values() fails to allocate entry->value,
causing an out of memory error.
This patch skips such entries early during parsing, allowing decoding
to continue normally.
Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/21623
---
libavcodec/exif.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index 01ffa88194..a184733e80 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -494,6 +494,11 @@ static int exif_decode_tag(void *logctx, GetByteContext
*gb, int le,
av_log(logctx, AV_LOG_DEBUG, "TIFF Tag: id: 0x%04x, type: %d, count: %u,
offset: %d, "
"payload: %" PRIu32 "\n", entry->id, type,
count, tell, payload);
+ if (!type) {
+ av_log(logctx, AV_LOG_DEBUG, "Skipping invalid TIFF tag 0\n");
+ goto end;
+ }
+
/* AV_TIFF_IFD is the largest, numerically */
if (type > AV_TIFF_IFD || count >= INT_MAX/8U)
return AVERROR_INVALIDDATA;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]