summaryrefslogtreecommitdiffhomepage
path: root/keyimport.c
diff options
context:
space:
mode:
authorLike Ma <likemartinma@gmail.com>2015-01-23 22:23:23 +0800
committerLike Ma <likemartinma@gmail.com>2015-01-23 22:23:23 +0800
commit5c57a31184c78ffb0c8f3be491c0c314f0776aae (patch)
tree63200fe9b24b46aec9194535a48085eb0b37f8f3 /keyimport.c
parent7b2c42aa75488a0dc4c720a1f3cdabfeef76ec91 (diff)
Fix variables may be uninitialized.
(fixup of pull request #7)
Diffstat (limited to 'keyimport.c')
-rw-r--r--keyimport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/keyimport.c b/keyimport.c
index 66a7f55..272fcce 100644
--- a/keyimport.c
+++ b/keyimport.c
@@ -627,7 +627,7 @@ static sign_key *openssh_read(const char *filename, char * UNUSED(passphrase))
if (i == 0) {
/* First integer is a version indicator */
- int expected;
+ int expected = -1;
switch (key->type) {
case OSSH_RSA:
case OSSH_DSA:
@@ -826,7 +826,7 @@ static int openssh_write(const char *filename, sign_key *key,
unsigned char *outblob = NULL;
int outlen = -9999;
struct mpint_pos numbers[9];
- int nnumbers = -1, pos, len, seqlen, i;
+ int nnumbers = -1, pos = 0, len = 0, seqlen, i;
char *header = NULL, *footer = NULL;
char zero[1];
int ret = 0;