aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilo <milo@r0ot.me>2011-03-09 12:58:47 +0100
committermilo <milo@r0ot.me>2011-04-14 13:32:16 +0200
commit9bf08f7c4d47b1c418b3ef4f074f607476d9c499 (patch)
treef4078ddc849f323422e84b4a91c37219a093abdd
parentf07ef420317c26ffa9b088b4a9c19aa7ec16f29f (diff)
downloadlibssh-9bf08f7c4d47b1c418b3ef4f074f607476d9c499.tar.gz
libssh-9bf08f7c4d47b1c418b3ef4f074f607476d9c499.tar.xz
libssh-9bf08f7c4d47b1c418b3ef4f074f607476d9c499.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 50cf7c3..205c659 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;