comparison 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
comparison
equal deleted inserted replaced
990:e3614649b1f5 991:4f65c867fc99
625 goto error; 625 goto error;
626 } 626 }
627 627
628 if (i == 0) { 628 if (i == 0) {
629 /* First integer is a version indicator */ 629 /* First integer is a version indicator */
630 int expected; 630 int expected = -1;
631 switch (key->type) { 631 switch (key->type) {
632 case OSSH_RSA: 632 case OSSH_RSA:
633 case OSSH_DSA: 633 case OSSH_DSA:
634 expected = 0; 634 expected = 0;
635 break; 635 break;
824 buffer * keyblob = NULL; 824 buffer * keyblob = NULL;
825 buffer * extrablob = NULL; /* used for calculated values to write */ 825 buffer * extrablob = NULL; /* used for calculated values to write */
826 unsigned char *outblob = NULL; 826 unsigned char *outblob = NULL;
827 int outlen = -9999; 827 int outlen = -9999;
828 struct mpint_pos numbers[9]; 828 struct mpint_pos numbers[9];
829 int nnumbers = -1, pos, len, seqlen, i; 829 int nnumbers = -1, pos = 0, len = 0, seqlen, i;
830 char *header = NULL, *footer = NULL; 830 char *header = NULL, *footer = NULL;
831 char zero[1]; 831 char zero[1];
832 int ret = 0; 832 int ret = 0;
833 FILE *fp; 833 FILE *fp;
834 834