mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2025-02-06 09:49:24 +03:00
URL Hyperlink data may not use the full length of the data field, but could instead be terminated by a null byte character
This commit is contained in:
parent
c2a04ab777
commit
780cb74782
@ -4562,6 +4562,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
|||||||
$offset += 4;
|
$offset += 4;
|
||||||
// offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated
|
// offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated
|
||||||
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
|
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
|
||||||
|
$nullOffset = strpos($url, 0x00);
|
||||||
|
if ($nullOffset)
|
||||||
|
$url = substr($url,0,$nullOffset);
|
||||||
$url .= $hasText ? '#' : '';
|
$url .= $hasText ? '#' : '';
|
||||||
$offset += $us;
|
$offset += $us;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user