mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
sftp: fix buffer_unpack argument to be char** rather than char*
Summary: buffer variable 's' gets unpacked as char**, the previous code was passing a char* causing segfaults on all readlink calls inside the unpacking code Test Plan: - without patchy examples/samplesftp segfaults in readlink - with patchy it doesn't Reviewers: asn Differential Revision: https://bugs.libssh.org/D14 Signed-off-by: Harald Sitter <sitter@kde.org>
This commit is contained in:
committed by
Andreas Schneider
parent
90373d8394
commit
97cb302c0e
@@ -2697,7 +2697,7 @@ char *sftp_readlink(sftp_session sftp, const char *path)
|
||||
rc = ssh_buffer_unpack(msg->payload,
|
||||
"ds",
|
||||
&ignored,
|
||||
lnk);
|
||||
&lnk);
|
||||
sftp_message_free(msg);
|
||||
if (rc != SSH_OK) {
|
||||
ssh_set_error(sftp->session,
|
||||
|
||||
Reference in New Issue
Block a user