mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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.
This commit is contained in:
parent
887a7b5714
commit
01a4de5c58
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue