mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: - Added missing bound check in iptcparse() (path by chris at chiappa.net)
This commit is contained in:
commit
6008f9af8f
@ -336,13 +336,13 @@ PHP_FUNCTION(iptcparse)
|
||||
len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];
|
||||
inx += 2;
|
||||
}
|
||||
|
||||
snprintf(key, sizeof(key), "%d#%03d", (unsigned int) dataset, (unsigned int) recnum);
|
||||
|
||||
if ((len > str_len) || (inx + len) > str_len) {
|
||||
|
||||
if ((len < 0) || (len > str_len) || (inx + len) > str_len) {
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(key, sizeof(key), "%d#%03d", (unsigned int) dataset, (unsigned int) recnum);
|
||||
|
||||
if (tagsfound == 0) { /* found the 1st tag - initialize the return array */
|
||||
array_init(return_value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user