mirror of
https://github.com/curl/curl.git
synced 2025-03-31 16:00:35 +08:00
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
This commit is contained in:
parent
7fc1cbb640
commit
91669584cf
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user