diff options
author | Stanislav Malyshev <stas@php.net> | 2015-08-29 23:01:36 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-08-29 23:01:36 -0700 |
commit | ce2c67c8e88ede70a3fe837a484fddc77aba4bb2 (patch) | |
tree | 4b9c28544e5266a2a1a8f4d096fb377a4311a5b5 /ext/exif/exif.c | |
parent | 03964892c054d0c736414c10b3edc7a40318b975 (diff) | |
download | php-git-ce2c67c8e88ede70a3fe837a484fddc77aba4bb2.tar.gz |
Improve fix for #70385
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r-- | ext/exif/exif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 43e68c449e..05041c5f00 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; |