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: 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);
|
||||
$nullOffset = strpos($url, 0x00);
|
||||
if ($nullOffset)
|
||||
$url = substr($url,0,$nullOffset);
|
||||
$url .= $hasText ? '#' : '';
|
||||
$offset += $us;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue