1
1

misc.c: _libssh2_ntohu32 cast bit shifting (#401)

To quite overly aggressive analyzers. 

Note, the builds pass, Travis is having some issues with Docker images.
Этот коммит содержится в:
Will Cosgrove 2019-08-29 12:12:21 -07:00 коммит произвёл GitHub
родитель 43f24eb152
Коммит e5732992b1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -191,7 +191,10 @@ _libssh2_send(libssh2_socket_t sock, const void *buffer, size_t length,
unsigned int
_libssh2_ntohu32(const unsigned char *buf)
{
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
return (((unsigned int)buf[0] << 24)
| ((unsigned int)buf[1] << 16)
| ((unsigned int)buf[2] << 8)
| ((unsigned int)buf[3]));
}