mirror of
https://github.com/php/php-src.git
synced 2026-04-18 05:21:02 +02:00
@- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
This commit is contained in:
@@ -223,6 +223,7 @@ static void php_read_APP(FILE *fp,unsigned int marker,pval *info)
|
||||
unsigned short length;
|
||||
unsigned char *buffer;
|
||||
unsigned char markername[ 16 ];
|
||||
zval *tmp;
|
||||
|
||||
length = php_read2(fp);
|
||||
length -= 2; /* length includes itself */
|
||||
@@ -235,7 +236,10 @@ static void php_read_APP(FILE *fp,unsigned int marker,pval *info)
|
||||
|
||||
sprintf(markername,"APP%d",marker - M_APP0);
|
||||
|
||||
add_assoc_stringl(info,markername,buffer,length,1);
|
||||
if (zend_hash_find(info->value.ht, markername, strlen(markername)+1, (void **) &tmp) == FAILURE) {
|
||||
/* XXX we onyl catch the 1st tag of it's kind! */
|
||||
add_assoc_stringl(info,markername,buffer,length,1);
|
||||
}
|
||||
|
||||
efree(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user