# HG changeset patch # User Like Ma # Date 1422023003 -28800 # Node ID 4f65c867fc991c19cff2851d24c3ee1167df6573 # Parent e3614649b1f5c14c107e9e616d5848f0424fb7da Fix variables may be uninitialized. (fixup of pull request #7) diff -r e3614649b1f5 -r 4f65c867fc99 keyimport.c --- 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;