X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/a92a95249e6e8cf732d34bf966a1a791f62eced4..8bba61e21ae5328ecb03b5223612411795c26e36:/sshpubk.c diff --git a/sshpubk.c b/sshpubk.c index 166afbcb..868fb15e 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -514,7 +514,7 @@ static char *read_body(FILE * fp) sfree(text); return NULL; } - if (len + 1 > size) { + if (len + 1 >= size) { size += 128; text = sresize(text, size, char); } @@ -906,7 +906,7 @@ char *ssh2_userkey_loadpub(const Filename *filename, char **algorithm, error = "file format error"; if ((b = read_body(fp)) == NULL) goto error; - /* Select key algorithm structure. Currently only ssh-rsa. */ + /* Select key algorithm structure. */ alg = find_pubkey_alg(b); if (!alg) { sfree(b);