mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Fixes to make r6434 actually useful.
[originally from svn r6435]
[r6434 == c14f259ba2
]
This commit is contained in:
parent
c14f259ba2
commit
ff05fb7ccc
15
sshpubk.c
15
sshpubk.c
@ -71,11 +71,6 @@ static int loadrsakey_main(FILE * fp, struct RSAKey *key, int pub_only,
|
|||||||
if (i < 0)
|
if (i < 0)
|
||||||
goto end; /* overran */
|
goto end; /* overran */
|
||||||
|
|
||||||
if (pub_only) {
|
|
||||||
ret = 1;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Next, the comment field. */
|
/* Next, the comment field. */
|
||||||
j = GET_32BIT(buf + i);
|
j = GET_32BIT(buf + i);
|
||||||
i += 4;
|
i += 4;
|
||||||
@ -88,9 +83,17 @@ static int loadrsakey_main(FILE * fp, struct RSAKey *key, int pub_only,
|
|||||||
}
|
}
|
||||||
i += j;
|
i += j;
|
||||||
if (commentptr)
|
if (commentptr)
|
||||||
*commentptr = comment;
|
*commentptr = dupstr(comment);
|
||||||
if (key)
|
if (key)
|
||||||
key->comment = comment;
|
key->comment = comment;
|
||||||
|
else
|
||||||
|
sfree(comment);
|
||||||
|
|
||||||
|
if (pub_only) {
|
||||||
|
ret = 1;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (!key) {
|
if (!key) {
|
||||||
ret = ciphertype != 0;
|
ret = ciphertype != 0;
|
||||||
*error = NULL;
|
*error = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user