1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

scp: More correct fix for snprintf 64-bit format.

This commit is contained in:
Andreas Schneider
2011-04-15 18:55:30 +02:00
parent e7e4f261a6
commit a6c53d51de
2 changed files with 10 additions and 2 deletions

View File

@ -293,8 +293,8 @@ int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int mo
}
file=ssh_basename(filename);
perms=ssh_scp_string_mode(mode);
ssh_log(scp->session,SSH_LOG_PROTOCOL,"SCP pushing file %s, size %llu with permissions '%s'",file,size,perms);
snprintf(buffer, sizeof(buffer), "C%s %llu %s\n", perms, size, file);
ssh_log(scp->session,SSH_LOG_PROTOCOL,"SCP pushing file %s, size %" PRIu64 " with permissions '%s'",file,size,perms);
snprintf(buffer, sizeof(buffer), "C%s %" PRIu64 " %s\n", perms, size, file);
SAFE_FREE(file);
SAFE_FREE(perms);
r=ssh_channel_write(scp->channel,buffer,strlen(buffer));