mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Fixed stupid "can't parse known host key" bug
due to a dangling \n in the base64 ...
This commit is contained in:
committed by
Andreas Schneider
parent
74eff86a6b
commit
e8e874909f
@@ -1074,6 +1074,7 @@ static char **ssh_get_knownhost_line(SSH_SESSION *session, FILE **file,
|
|||||||
while (fgets(buffer, sizeof(buffer), *file)) {
|
while (fgets(buffer, sizeof(buffer), *file)) {
|
||||||
ptr = strchr(buffer, '\n');
|
ptr = strchr(buffer, '\n');
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
|
*ptr = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = strchr(buffer,'\r');
|
ptr = strchr(buffer,'\r');
|
||||||
|
|||||||
Reference in New Issue
Block a user