mirror of
https://github.com/php/php-src.git
synced 2024-12-16 21:37:49 +08:00
exif add simple assert into jpeg header parsing as safety net more in a context of a possible text change. follow-up on GH-10402.
Close GH-10416.
This commit is contained in:
parent
256a34ed15
commit
1ab5d35bde
@ -3805,6 +3805,9 @@ static bool exif_scan_JPEG_header(image_info_type *ImageInfo)
|
||||
|
||||
fpos = php_stream_tell(ImageInfo->infile);
|
||||
|
||||
/* safety net in case the above algorithm change dramatically, should not trigger */
|
||||
ZEND_ASSERT(marker != 0xff);
|
||||
|
||||
/* Read the length of the section. */
|
||||
if ((lh = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) {
|
||||
EXIF_ERRLOG_CORRUPT(ImageInfo)
|
||||
|
Loading…
Reference in New Issue
Block a user