From 3d390cf6ff65bf2d88170c9ee4bc4aa3ca7c0c68 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 8 Oct 2012 22:46:56 +0200 Subject: [PATCH] pki: Make sure the key_buf is null terminated. Found by Coverity. --- src/pki.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pki.c b/src/pki.c index cba73ce2..9f677b02 100644 --- a/src/pki.c +++ b/src/pki.c @@ -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++;