X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssharcf.c;h=d16ce22540b85a8f937c7f03cb3b06bddee8e612;hb=19467455fe7840ab146f47136c88f61c87365e8c;hp=6bfbd8959531ee63a5524b22542454aba0d8a8e0;hpb=42801b7e9ee410379563b46fde0656596f807451;p=PuTTY.git diff --git a/ssharcf.c b/ssharcf.c index 6bfbd895..d16ce225 100644 --- a/ssharcf.c +++ b/ssharcf.c @@ -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); } @@ -100,16 +100,18 @@ static void arcfour_iv(void *handle, unsigned char *key) const struct ssh2_cipher ssh_arcfour128_ssh2 = { arcfour_make_context, arcfour_free_context, arcfour_iv, arcfour128_key, - arcfour_block, arcfour_block, + arcfour_block, arcfour_block, NULL, NULL, "arcfour128", - 1, 128, 0, "Arcfour-128" + 1, 128, 16, 0, "Arcfour-128", + NULL }; const struct ssh2_cipher ssh_arcfour256_ssh2 = { arcfour_make_context, arcfour_free_context, arcfour_iv, arcfour256_key, - arcfour_block, arcfour_block, + arcfour_block, arcfour_block, NULL, NULL, "arcfour256", - 1, 256, 0, "Arcfour-256" + 1, 256, 32, 0, "Arcfour-256", + NULL }; static const struct ssh2_cipher *const arcfour_list[] = {