From f56daac7fe34e0fc9af9ab7fc07f4cedb133e242 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 7 Mar 2008 11:55:07 +0000 Subject: [PATCH] - Mike Protts filed the bug report #1908724 that identified and fixed a problem with SFTP stat on files >4GB in size. Previously it used 32bit math only. --- NEWS | 4 ++++ src/misc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5c25094..db2660c 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ Version 0.19 ( ) ------------------------------- + +- Mike Protts filed the bug report #1908724 that identified and fixed a problem + with SFTP stat on files >4GB in size. Previously it used 32bit math only. + - Removed a stderr debug message that was accidentally left in (bug #1863153) diff --git a/src/misc.c b/src/misc.c index 05f6329..22f8c12 100644 --- a/src/misc.c +++ b/src/misc.c @@ -62,7 +62,7 @@ libssh2_ntohu64(const unsigned char *buf) msl = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; lsl = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; - return ((msl * 65536) * 65536) + lsl; + return ((libssh2_uint64_t)msl <<32) | lsl; } /* }}} */