diff options
author | Harald Sitter <sitter@kde.org> | 2018-09-18 15:10:14 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-19 11:18:12 +0200 |
commit | 97cb302c0ea43788a78853f8fd4a8bfa066191a3 (patch) | |
tree | 67cf47be95b7a29513a980041ce106bf7e9c1b09 | |
parent | 90373d8394e07f014931e2f5deb5a80a46b30ebc (diff) | |
download | libssh-97cb302c0ea43788a78853f8fd4a8bfa066191a3.tar.gz libssh-97cb302c0ea43788a78853f8fd4a8bfa066191a3.tar.xz libssh-97cb302c0ea43788a78853f8fd4a8bfa066191a3.zip |
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>
-rw-r--r-- | src/sftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |