Skip to content

Commit 6cc1a11

Browse files
committed
exif/heic: Make sure pos is always initialized
1 parent 7a6a763 commit 6cc1a11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/exif/exif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4398,7 +4398,6 @@ static bool exif_scan_HEIF_header(image_info_type *ImageInfo, unsigned char *buf
43984398
int box_header_size, remain;
43994399
bool ret = false;
44004400

4401-
pos.size = 0;
44024401
for (offset = php_ifd_get32u(buf, 1); ImageInfo->FileSize - 16 > offset; offset += box.size) {
44034402
if ((php_stream_seek(ImageInfo->infile, offset, SEEK_SET) < 0) ||
44044403
(exif_read_from_stream_file_looped(ImageInfo->infile, (char*)buf, 16) != 16)) {
@@ -4418,6 +4417,7 @@ static bool exif_scan_HEIF_header(image_info_type *ImageInfo, unsigned char *buf
44184417
if (remain) {
44194418
memcpy(data, buf + box_header_size, remain);
44204419
}
4420+
memset(&pos, 0, sizeof(pos));
44214421
if (exif_read_from_stream_file_looped(ImageInfo->infile, (char*)(data + remain), limit - remain) == limit - remain) {
44224422
exif_isobmff_parse_meta(data, data + limit, &pos);
44234423
}

0 commit comments

Comments
 (0)