php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch 0001-Fix-72735-regression-in-exif-for-MakerNote.patch for EXIF related Bug #72735

Patch version 2016-08-03 08:10 UTC

Return to Bug #72735 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2016-08-03 08:38 UTC | 2016-08-03 08:10 UTC

Developer: remi@php.net


 From cfc79fc0b704482b663f8700bfe88ecc7a949cbc Mon Sep 17 00:00:00 2001
 From e9a5b44a9e5030bee90543699b3f6b05a422eba0 Mon Sep 17 00:00:00 2001
  From: Remi Collet <fedora@famillecollet.com>
  Date: Wed, 3 Aug 2016 10:09:06 +0200
  Subject: [PATCH] Fix #72735 regression in exif for MakerNote
  


   create mode 100644 ext/exif/tests/panasonic.jpg
   create mode 100644 ext/exif/tests/samsung.jpg
  
  diff --git a/ext/exif/exif.c b/ext/exif/exif.c
 index 5564de4..ea11f37 100644
 index 5564de4..c9b00ee 100644
  --- a/ext/exif/exif.c
  +++ b/ext/exif/exif.c
  @@ -1708,6 +1708,9 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
   			if (!length)
   				break;
   		case TAG_FMT_UNDEFINED:
  +			if (tag == TAG_MAKER_NOTE) {
 +				length = MIN(length, strlen(value));
 +				length = strlen(value);
  +			}
   			if (value) {
   				/* do not recompute length here */
   				info_value->s = estrndup(value, length);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Aug 23 11:01:26 2019 UTC