com php-src: Improve fix for #70385: ext/exif/exif.c

From: Date: Sun, 30 Aug 2015 06:01:36 +0000
Subject: com php-src: Improve fix for #70385: ext/exif/exif.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88829@lists.php.net to get a copy of this message
Commit: ce2c67c8e88ede70a3fe837a484fddc77aba4bb2 Author: Stanislav Malyshev <stas@php.net> Sat, 29 Aug 2015 23:01:36 -0700 Parents: 03964892c054d0c736414c10b3edc7a40318b975 Branches: PHP-5.4 PHP-5.4.45 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ce2c67c8e88ede70a3fe837a484fddc77aba4bb2 Log: Improve fix for #70385 Bugs: https://bugs.php.net/70385 Changed paths: M ext/exif/exif.c Diff: diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 43e68c4..05041c5 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2964,13 +2964,13 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha if (length<byte_count-1) { /* When there are any characters after the first NUL */ ImageInfo->CopyrightPhotographer = estrdup(value_ptr); - ImageInfo->CopyrightEditor = estrdup(value_ptr+length+1); + ImageInfo->CopyrightEditor = estrndup(value_ptr+length+1, byte_count-length-1); spprintf(&ImageInfo->Copyright, 0, "%s, %s", value_ptr, value_ptr+length+1); /* format = TAG_FMT_UNDEFINED; this musn't be ASCII */ /* but we are not supposed to change this */ /* keep in mind that image_info does not store editor value */ } else { - ImageInfo->Copyright = estrdup(value_ptr); + ImageInfo->Copyright = estrndup(value_ptr, byte_count); } } break;

« previous php.cvs (#88829) next »