diff keyimport.c @ 991:4f65c867fc99

Fix variables may be uninitialized. (fixup of pull request #7)
author Like Ma <likemartinma@gmail.com>
date Fri, 23 Jan 2015 22:23:23 +0800
parents 25692c60479e
children 97d1e54941fd
line wrap: on
line diff
--- a/keyimport.c	Fri Jan 23 22:21:06 2015 +0800
+++ b/keyimport.c	Fri Jan 23 22:23:23 2015 +0800
@@ -627,7 +627,7 @@
 
 		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 @@
 	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;