summaryrefslogtreecommitdiff
path: root/ext/exif/exif.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2019-12-16 00:38:54 -0800
committerStanislav Malyshev <stas@php.net>2019-12-16 00:38:54 -0800
commita65b8abf2c9702503591d894ddac0b2f046950b6 (patch)
treed5032e847df212853f6c17c7d864b816d5638b87 /ext/exif/exif.c
parent518a160b65fe1c535dc7e78972ba7428c2a4e197 (diff)
parentd348cfb96f2543565691010ade5e0346338be5a7 (diff)
downloadphp-git-a65b8abf2c9702503591d894ddac0b2f046950b6.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r--ext/exif/exif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 1c2f0d143b..362e63d9a3 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -3138,7 +3138,10 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "check (%s)", maker_note->make?maker_note->make:"");*/
if (maker_note->make && (!ImageInfo->make || strcmp(maker_note->make, ImageInfo->make)))
continue;
- if (maker_note->id_string && strncmp(maker_note->id_string, value_ptr, maker_note->id_string_len))
+ if (maker_note->model && (!ImageInfo->model || strcmp(maker_note->model, ImageInfo->model)))
+ continue;
+ if (maker_note->id_string && value_len >= maker_note->id_string_len
+ && strncmp(maker_note->id_string, value_ptr, maker_note->id_string_len))
continue;
break;
}