From e96fe70cabcb3a5a009821dbb453dc0160ddc3f5 Mon Sep 17 00:00:00 2001 From: Jim Fuller Date: Sun, 8 Mar 2020 18:35:21 +0100 Subject: sftp: fix segfault regression introduced by #4747 This fix adds a defensive check for the case where the char *name in struct libssh2_knownhost is NULL Fixes #5041 Closes #5062 --- tests/data/test1459 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/data/test1459 (limited to 'tests/data/test1459') diff --git a/tests/data/test1459 b/tests/data/test1459 new file mode 100644 index 000000000..3e89595e4 --- /dev/null +++ b/tests/data/test1459 @@ -0,0 +1,46 @@ + + + +SFTP +known_hosts + + + +# +# Client-side + + +sftp + + +mkdir -p %PWD/log/test1459.dir/.ssh + + +sftp + + +SFTP with corrupted known_hosts + + +-u : sftp://%HOSTIP:%SSHPORT/ -l + + +|1|qy29Y1x/+/F39AzdG5515YSSw+c=|iB2WX5jrU3ZTWc+ZfGau7HHEvBc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAynDN8cDJ3xNzRjTNNGciSHSxpubxhZ6YnkLdp1TkrGW8n\ +R93Ey5VtBeBblYTRlFXBWJgKFcTKBRJ/O4qBZwbUgt10AHj31i6h8NehfT19tR8wG/YCmj3KtYLHmwdzmW1edEL9G2NdX2KiKYv7/zuly3QvmP0QA0NhWkAz0KdWNM= + + +CURL_HOME=%PWD/log/test1459.dir + + + +# Verify data after the test has been "shot" + + +60 + + +disable + + + + -- cgit v1.2.3