com php-src: Pointer arithmetic on void pointers is illegal: ext/exif/exif.c

From: Date: Tue, 02 Apr 2019 08:39:44 +0000
Subject: com php-src: Pointer arithmetic on void pointers is illegal: ext/exif/exif.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105464@lists.php.net to get a copy of this message
Commit: 01a4de5c5821f67daeff487ef9b3047ce7b47c4c Author: Christoph M. Becker <cmbecker69@gmx.de> Tue, 2 Apr 2019 10:37:40 +0200 Parents: 887a7b571407f7a49a5e7cf1e612d21ef83fedb4 Branches: PHP-7.1 PHP-7.2 PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=01a4de5c5821f67daeff487ef9b3047ce7b47c4c Log: Pointer arithmetic on void pointers is illegal We quick-fix this by casting to char*; it might be more appropriate to use char pointers in the first place. Changed paths: M ext/exif/exif.c Diff: diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 408bf03..37b8407 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1740,9 +1740,9 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c } else { info_value = &info_data->value; } - vptr_end = value+value_len; + vptr_end = (char *) value + value_len; for (idex=0,vptr=value; idex<(size_t)length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) { - if (vptr_end - vptr < php_tiff_bytes_per_format[format]) { + if ((char *) vptr_end - (char *) vptr < php_tiff_bytes_per_format[format]) { exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "Value too short"); break; }

« previous php.cvs (#105464) next »