diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-10-08 22:46:56 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-12 14:45:54 +0200 |
commit | 3d390cf6ff65bf2d88170c9ee4bc4aa3ca7c0c68 (patch) | |
tree | 00c67fdf6198f9b65da8713732e0d695dd5a1f29 | |
parent | e04dc45f2043e8bf0a837eda84a909fa45cadf87 (diff) | |
download | libssh-3d390cf6ff65bf2d88170c9ee4bc4aa3ca7c0c68.tar.gz libssh-3d390cf6ff65bf2d88170c9ee4bc4aa3ca7c0c68.tar.xz libssh-3d390cf6ff65bf2d88170c9ee4bc4aa3ca7c0c68.zip |
pki: Make sure the key_buf is null terminated.
Found by Coverity.
-rw-r--r-- | src/pki.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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++; |