From c20afa75a270ebc7254c763dc929c69469efe37e Mon Sep 17 00:00:00 2001 From: milo Date: Wed, 9 Mar 2011 12:58:47 +0100 Subject: [PATCH] [pki] Fixed a probable bug in privatekey_file_to_buffer() --- src/keyfiles.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/keyfiles.c b/src/keyfiles.c index 50cf7c3e..205c6592 100644 --- a/src/keyfiles.c +++ b/src/keyfiles.c @@ -532,9 +532,8 @@ static ssh_buffer privatekey_file_to_buffer(FILE *fp, int type, if (len > 11 && strncmp("Proc-Type: 4,ENCRYPTED", buf, 11) == 0) { len = read_line(buf, MAXLINESIZE, fp); if (len > 10 && strncmp("DEK-Info: ", buf, 10) == 0) { - if ((privatekey_dek_header(buf + 10, len - 10, &algo, &mode, &key_len, - &iv, &iv_len) < 0) - || read_line(buf, MAXLINESIZE, fp)) { + if (privatekey_dek_header(buf + 10, len - 10, &algo, &mode, &key_len, + &iv, &iv_len) < 0) { ssh_buffer_free(buffer); SAFE_FREE(iv); return NULL;