From: Kalle Sommer Nielsen Date: Wed, 3 Aug 2016 15:33:18 +0000 (+0200) Subject: Fixed bug #72682 (exif_read_data() fails to read all data for some images) X-Git-Tag: php-7.2.0alpha1~1558^2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6bd054b86c52948505be7409ad8d6488db062f6;p=php Fixed bug #72682 (exif_read_data() fails to read all data for some images) This is fixed by adding DJI signatures to the MAKERNOTE and its supported tags, list is credits to ExifTool documentation. --- diff --git a/NEWS b/NEWS index 71cc1fbe68..e7e53073cc 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Changed the way that EXIF processes MAKERNOTE data to not stop parsing in case of an unknown signature. (Kalle, Remi) . Fixed bug #72735 (Samsung picture thumb not read (zero size)). (Kalle) + . Fixed bug #72682 (exif_read_data() fails to read all data for some + images). (Kalle) . Fixed Redhat bug #1362571 (PHP not returning full results for exif_read_data function). (Kalle) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 50db48df76..b340b51fe2 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1095,6 +1095,20 @@ static tag_info_array tag_table_VND_PANASONIC = { TAG_TABLE_END }; +static tag_info_array tag_table_VND_DJI = { + { 0x0001, "Make"}, + { 0x0003, "SpeedX"}, + { 0x0004, "SpeedY"}, + { 0x0005, "SpeedZ"}, + { 0x0006, "Pitch"}, + { 0x0007, "Yaw"}, + { 0x0008, "Roll"}, + { 0x0009, "CameraPitch"}, + { 0x000a, "CameraYaw"}, + { 0x000b, "CameraRoll"}, + TAG_TABLE_END +}; + typedef enum mn_byte_order_t { MN_ORDER_INTEL = 0, MN_ORDER_MOTOROLA = 1, @@ -1127,7 +1141,8 @@ static const maker_note_type maker_note_array[] = { { tag_table_VND_NIKON_990, "NIKON", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_OLYMPUS, "OLYMPUS OPTICAL CO.,LTD", NULL, "OLYMP\x00\x01\x00", 8, 8, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, { tag_table_VND_SAMSUNG, "SAMSUNG", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, - { tag_table_VND_PANASONIC, "Panasonic", NULL, "Panasonic\x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL} + { tag_table_VND_PANASONIC, "Panasonic", NULL, "Panasonic\x00\x00\x00", 12, 12, MN_ORDER_NORMAL, MN_OFFSET_NORMAL}, + { tag_table_VND_DJI, "DJI", NULL, NULL, 0, 0, MN_ORDER_NORMAL, MN_OFFSET_NORMAL} }; /* }}} */