mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-16 08:41:51 +03:00
scp: Fix snprintf format for 64-bit size on SCP push.
Signed-off-by: Mark Riordan <mriordan@ipswitch.com> Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
96d5f13813
commit
e7e4f261a6
@ -293,8 +293,8 @@ int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int mo
|
|||||||
}
|
}
|
||||||
file=ssh_basename(filename);
|
file=ssh_basename(filename);
|
||||||
perms=ssh_scp_string_mode(mode);
|
perms=ssh_scp_string_mode(mode);
|
||||||
ssh_log(scp->session,SSH_LOG_PROTOCOL,"SCP pushing file %s, size %" PRIdS " with permissions '%s'",file,size,perms);
|
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 %" PRIdS " %s\n", perms, size, file);
|
snprintf(buffer, sizeof(buffer), "C%s %llu %s\n", perms, size, file);
|
||||||
SAFE_FREE(file);
|
SAFE_FREE(file);
|
||||||
SAFE_FREE(perms);
|
SAFE_FREE(perms);
|
||||||
r=ssh_channel_write(scp->channel,buffer,strlen(buffer));
|
r=ssh_channel_write(scp->channel,buffer,strlen(buffer));
|
||||||
|
Reference in New Issue
Block a user