mirror of
https://github.com/php/php-src.git
synced 2026-04-21 06:51:18 +02:00
Remove duplicated length check in exif and
remove always false condition from exif The latter condition will never trigger because otherwise the do-while loop wouldn't have exited. Close GH-10402
This commit is contained in:
committed by
David Carlier
parent
23dab38fe9
commit
f4dd35ea53
@@ -3679,11 +3679,6 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf,
|
||||
return;
|
||||
}
|
||||
|
||||
if (length < 2) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set the thumbnail stuff to nothing so we can test to see if they get set up */
|
||||
if (memcmp(CharBuf, "II", 2) == 0) {
|
||||
ImageInfo->motorola_intel = 0;
|
||||
@@ -3810,12 +3805,6 @@ static bool exif_scan_JPEG_header(image_info_type *ImageInfo)
|
||||
|
||||
fpos = php_stream_tell(ImageInfo->infile);
|
||||
|
||||
if (marker == 0xff) {
|
||||
/* 0xff is legal padding, but if we get that many, something's wrong. */
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "To many padding bytes");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Read the length of the section. */
|
||||
if ((lh = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) {
|
||||
EXIF_ERRLOG_CORRUPT(ImageInfo)
|
||||
|
||||
Reference in New Issue
Block a user