mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
Fix assertion with Visual Studio because of %zu.
This commit is contained in:
@@ -478,7 +478,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
|
|||||||
len = ssh_string_len(str);
|
len = ssh_string_len(str);
|
||||||
|
|
||||||
ssh_log(session, SSH_LOG_PROTOCOL,
|
ssh_log(session, SSH_LOG_PROTOCOL,
|
||||||
"Channel receiving %zu bytes data in %d (local win=%d remote win=%d)",
|
"Channel receiving %" PRIdS " bytes data in %d (local win=%d remote win=%d)",
|
||||||
len,
|
len,
|
||||||
is_stderr,
|
is_stderr,
|
||||||
channel->local_window,
|
channel->local_window,
|
||||||
@@ -487,7 +487,7 @@ SSH_PACKET_CALLBACK(channel_rcv_data){
|
|||||||
/* What shall we do in this case? Let's accept it anyway */
|
/* What shall we do in this case? Let's accept it anyway */
|
||||||
if (len > channel->local_window) {
|
if (len > channel->local_window) {
|
||||||
ssh_log(session, SSH_LOG_RARE,
|
ssh_log(session, SSH_LOG_RARE,
|
||||||
"Data packet too big for our window(%zu vs %d)",
|
"Data packet too big for our window(%" PRIdS " vs %d)",
|
||||||
len,
|
len,
|
||||||
channel->local_window);
|
channel->local_window);
|
||||||
}
|
}
|
||||||
|
@@ -232,7 +232,7 @@ SSH_PACKET_CALLBACK(ssh_packet_data1){
|
|||||||
}
|
}
|
||||||
|
|
||||||
ssh_log(session, SSH_LOG_PROTOCOL,
|
ssh_log(session, SSH_LOG_PROTOCOL,
|
||||||
"Adding %zu bytes data in %d",
|
"Adding %" PRIdS " bytes data in %d",
|
||||||
ssh_string_len(str), is_stderr);
|
ssh_string_len(str), is_stderr);
|
||||||
|
|
||||||
if (channel_default_bufferize(channel, ssh_string_data(str), ssh_string_len(str),
|
if (channel_default_bufferize(channel, ssh_string_data(str), ssh_string_len(str),
|
||||||
|
@@ -761,7 +761,7 @@ SSH_PACKET_CALLBACK(ssh_packet_publickey1){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bits = ssh_string_len(enc_session) * 8 - 7;
|
bits = ssh_string_len(enc_session) * 8 - 7;
|
||||||
ssh_log(session, SSH_LOG_PROTOCOL, "%d bits, %zu bytes encrypted session",
|
ssh_log(session, SSH_LOG_PROTOCOL, "%d bits, %" PRIdS " bytes encrypted session",
|
||||||
bits, ssh_string_len(enc_session));
|
bits, ssh_string_len(enc_session));
|
||||||
bits = htons(bits);
|
bits = htons(bits);
|
||||||
/* the encrypted mpint */
|
/* the encrypted mpint */
|
||||||
|
@@ -1817,7 +1817,7 @@ ssize_t sftp_read(sftp_file handle, void *buf, size_t count) {
|
|||||||
if (ssh_string_len(datastring) > count) {
|
if (ssh_string_len(datastring) > count) {
|
||||||
ssh_set_error(sftp->session, SSH_FATAL,
|
ssh_set_error(sftp->session, SSH_FATAL,
|
||||||
"Received a too big DATA packet from sftp server: "
|
"Received a too big DATA packet from sftp server: "
|
||||||
"%zu and asked for %zu",
|
"%" PRIdS " and asked for %" PRIdS,
|
||||||
ssh_string_len(datastring), count);
|
ssh_string_len(datastring), count);
|
||||||
ssh_string_free(datastring);
|
ssh_string_free(datastring);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1938,7 +1938,7 @@ int sftp_async_read(sftp_file file, void *data, uint32_t size, uint32_t id){
|
|||||||
if (ssh_string_len(datastring) > size) {
|
if (ssh_string_len(datastring) > size) {
|
||||||
ssh_set_error(sftp->session, SSH_FATAL,
|
ssh_set_error(sftp->session, SSH_FATAL,
|
||||||
"Received a too big DATA packet from sftp server: "
|
"Received a too big DATA packet from sftp server: "
|
||||||
"%zu and asked for %u",
|
"%" PRIdS " and asked for %u",
|
||||||
ssh_string_len(datastring), size);
|
ssh_string_len(datastring), size);
|
||||||
ssh_string_free(datastring);
|
ssh_string_free(datastring);
|
||||||
sftp_leave_function();
|
sftp_leave_function();
|
||||||
|
Reference in New Issue
Block a user