X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssharcf.c;h=06f235c5be069ab7d70aaedc1be7f4d910088ed4;hb=d5836982e23d8a6176114e1073469950c4eaae37;hp=2381d8870251a422dff31e9a29e246f71850b278;hpb=bcf547a069e2436abbea62e1f0d658178394a68b;p=PuTTY.git diff --git a/ssharcf.c b/ssharcf.c index 2381d887..06f235c5 100644 --- a/ssharcf.c +++ b/ssharcf.c @@ -19,7 +19,7 @@ static void arcfour_block(void *handle, unsigned char *blk, int len) s = ctx->s; i = ctx->i; j = ctx->j; - for (k = 0; k < len; k++) { + for (k = 0; (int)k < len; k++) { i = (i + 1) & 0xff; j = (j + s[i]) & 0xff; tmp = s[i]; s[i] = s[j]; s[j] = tmp; @@ -75,7 +75,7 @@ static void arcfour_stir(ArcfourContext *ctx) unsigned char *junk = snewn(1536, unsigned char); memset(junk, 0, 1536); arcfour_block(ctx, junk, 1536); - memset(junk, 0, 1536); + smemclr(junk, 1536); sfree(junk); }