mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
sftp: Cast sftp version to int
This is a public struct and the version should be unsigned there. Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -263,7 +263,7 @@ int sftp_server_init(sftp_session sftp){
|
|||||||
ssh_buffer_get_u32(packet->payload, &version);
|
ssh_buffer_get_u32(packet->payload, &version);
|
||||||
version = ntohl(version);
|
version = ntohl(version);
|
||||||
SSH_LOG(SSH_LOG_PACKET, "Client version: %d", version);
|
SSH_LOG(SSH_LOG_PACKET, "Client version: %d", version);
|
||||||
sftp->client_version = version;
|
sftp->client_version = (int)version;
|
||||||
|
|
||||||
reply = ssh_buffer_new();
|
reply = ssh_buffer_new();
|
||||||
if (reply == NULL) {
|
if (reply == NULL) {
|
||||||
@@ -294,7 +294,7 @@ int sftp_server_init(sftp_session sftp){
|
|||||||
if (version > LIBSFTP_VERSION) {
|
if (version > LIBSFTP_VERSION) {
|
||||||
sftp->version = LIBSFTP_VERSION;
|
sftp->version = LIBSFTP_VERSION;
|
||||||
} else {
|
} else {
|
||||||
sftp->version=version;
|
sftp->version = (int)version;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -725,7 +725,7 @@ int sftp_init(sftp_session sftp) {
|
|||||||
rc = ssh_buffer_unpack(packet->payload, "s", &ext_name);
|
rc = ssh_buffer_unpack(packet->payload, "s", &ext_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
sftp->version = sftp->server_version = version;
|
sftp->version = sftp->server_version = (int)version;
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user