Skip to content

Commit d4a9726

Browse files
committed
exif: read from the correct pointer
`vptr` points to the current value being iterated over, not `value`, see other switch cases. Closes GH-22249.
1 parent eba6d71 commit d4a9726

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
. Fix GH-22219 (Dom\XMLDocument::schemaValidate fails to resolve
1515
xs:QName with prefix from imported schema). (David Carlier)
1616

17+
- Exif:
18+
. Read correct value for single and double tags. (ndossche)
19+
1720
- GD:
1821
. Fixed bug GH-22121 (Double free in gdImageSetStyle() after
1922
overflow-triggered early return). (iliaal)

ext/exif/exif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,13 +2306,13 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
23062306
#ifdef EXIF_DEBUG
23072307
php_error_docref(NULL, E_WARNING, "Found value of type single");
23082308
#endif
2309-
info_value->f = php_ifd_get_float(value);
2309+
info_value->f = php_ifd_get_float(vptr);
23102310
break;
23112311
case TAG_FMT_DOUBLE:
23122312
#ifdef EXIF_DEBUG
23132313
php_error_docref(NULL, E_WARNING, "Found value of type double");
23142314
#endif
2315-
info_value->d = php_ifd_get_double(value);
2315+
info_value->d = php_ifd_get_double(vptr);
23162316
break;
23172317
}
23182318
}

0 commit comments

Comments
 (0)