aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilo <milo@r0ot.me>2011-03-09 12:58:47 +0100
committermilo <milo@r0ot.me>2011-03-17 11:41:50 +0100
commitbe92ef25aafe9a0eb4611b626bee09733fd457d0 (patch)
treec4f1778dc4c0b66c9f5c7d9f2e0339bf169dcd68
parent90a2c361fc147b7d8aea94c429e85da907b67365 (diff)
downloadlibssh-be92ef25aafe9a0eb4611b626bee09733fd457d0.tar.gz
libssh-be92ef25aafe9a0eb4611b626bee09733fd457d0.tar.xz
libssh-be92ef25aafe9a0eb4611b626bee09733fd457d0.zip
[pki] Fixed a probable bug in privatekey_file_to_buffer()
-rw-r--r--src/keyfiles.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/keyfiles.c b/src/keyfiles.c
index 81d26da..af81fd4 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;