1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-16 08:41:51 +03:00

pki: Make sure the key_buf is null terminated.

Found by Coverity.
This commit is contained in:
Andreas Schneider
2012-10-08 22:46:56 +02:00
parent e04dc45f20
commit 3d390cf6ff

View File

@ -838,6 +838,7 @@ int ssh_pki_import_pubkey_file(const char *filename, ssh_key *pkey)
filename, strerror(errno));
return SSH_ERROR;
}
key_buf[size] = '\0';
q = p = key_buf;
while (!isspace((int)*p)) p++;