aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-12-14 21:01:09 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-12-14 21:01:09 +0000
commit91669584cf2e0d1b334c3c9b13fb2834bc0291ca (patch)
tree4f5bfa6d4c9b6b8a7cdda7e973da52cc2c1412d9 /lib
parent7fc1cbb640885cca6c3737cfd451440225ac9ca7 (diff)
smb.c: Fixed code analysis warning
smb.c:320: warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Result may not be an expected value
Diffstat (limited to 'lib')
-rw-r--r--lib/smb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/smb.c b/lib/smb.c
index b310b0e17..9648f6519 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -317,7 +317,7 @@ static CURLcode smb_recv_message(struct connectdata *conn, void **msg)
if(nbt_size >= msg_size + sizeof(unsigned short)) {
/* Add the byte count */
msg_size += sizeof(unsigned short) + ((unsigned char) buf[msg_size]) +
- (((unsigned char) buf[msg_size + 1]) << 8);
+ (((size_t) ((unsigned char) buf[msg_size + 1])) << 8);
if(nbt_size < msg_size)
return CURLE_READ_ERROR;
}