mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 19:21:09 +00:00
SFTP: Use hexdec() and bin2hex() for filesize calculation.
This commit is contained in:
parent
1b57990e94
commit
5c3058cc4b
@ -2479,9 +2479,7 @@ class Net_SFTP extends Net_SSH2
|
||||
// IEEE 754 binary64 "double precision" on such platforms and
|
||||
// as such can represent integers of at least 2^50 without loss
|
||||
// of precision. Interpreted in filesize, 2^50 bytes = 1024 TiB.
|
||||
extract(unpack('Nupper/Nsize', $this->_string_shift($response, 8)));
|
||||
$attr['size'] = $upper ? 4294967296 * $upper : 0;
|
||||
$attr['size']+= $size < 0 ? ($size & 0x7FFFFFFF) + 0x80000000 : $size;
|
||||
$attr['size'] = hexdec(bin2hex($this->_string_shift($response, 8)));
|
||||
break;
|
||||
case NET_SFTP_ATTR_UIDGID: // 0x00000002 (SFTPv3 only)
|
||||
$attr+= unpack('Nuid/Ngid', $this->_string_shift($response, 8));
|
||||
|
Loading…
Reference in New Issue
Block a user