You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avcodec/exif: check count in exif_decode_tag()
Fixes: out of array access Fixes: integer overflow Fixes: poc_heap_bof Found-by: *2ourc3 (Salim LARGO) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Leo Izen
parent
88e04205b3
commit
647138334a
@@ -477,7 +477,7 @@ static int exif_decode_tag(void *logctx, GetByteContext *gb, int le,
|
||||
"payload: %" PRIu32 "\n", entry->id, type, count, tell, payload);
|
||||
|
||||
/* AV_TIFF_IFD is the largest, numerically */
|
||||
if (type > AV_TIFF_IFD)
|
||||
if (type > AV_TIFF_IFD || count >= INT_MAX/8U)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
is_ifd = type == AV_TIFF_IFD || ff_tis_ifd(entry->id) || entry->id == MAKERNOTE_TAG;
|
||||
|
||||
Reference in New Issue
Block a user