X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/af1da2469967bdb6fcabd17750d1c5f88a3389d0..3d5040f8f85f049cbb072a827a6184b4b4314b08:/sshdss.c diff --git a/sshdss.c b/sshdss.c index 1f15cee9..532c13f2 100644 --- a/sshdss.c +++ b/sshdss.c @@ -42,7 +42,7 @@ static void getstring(char **data, int *datalen, char **p, int *length) *p = NULL; if (*datalen < 4) return; - *length = GET_32BIT(*data); + *length = toint(GET_32BIT(*data)); if (*length < 0) return; *datalen -= 4; @@ -289,6 +289,8 @@ static int dss_verifysig(void *key, char *sig, int siglen, freebn(w); freebn(sha); + freebn(u1); + freebn(u2); freebn(gu1p); freebn(yu2p); freebn(gu1yu2p); @@ -404,6 +406,7 @@ static void *dss_createkey(unsigned char *pub_blob, int pub_len, ytest = modpow(dss->g, dss->x, dss->p); if (0 != bignum_cmp(ytest, dss->y)) { dss_freekey(dss); + freebn(ytest); return NULL; } freebn(ytest);