From e71798a265a3e425c609dd464039319dfe33318f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 20 Sep 2018 17:42:48 +0100 Subject: [PATCH] Fix copy-paste error in sshdes.c. Apparently introduced just now in commit 6c5cc49e2; thanks to Colin Harrison for pointing it out very promptly. All this FROMFIELD business, helpful as it is, doesn't change the fact that you can still absentmindedly cast something to the wrong type if you're specifying the type explicitly! --- sshdes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshdes.c b/sshdes.c index c3afe3eb..d35c894e 100644 --- a/sshdes.c +++ b/sshdes.c @@ -821,13 +821,13 @@ static void des3_ssh1_sesskey(ssh1_cipher *cipher, const void *key) static void des3_ssh1_encrypt_blk(ssh1_cipher *cipher, void *blk, int len) { - struct des_ssh1_ctx *ctx = FROMFIELD(cipher, struct des_ssh1_ctx, vt); + struct des3_ssh1_ctx *ctx = FROMFIELD(cipher, struct des3_ssh1_ctx, vt); des_3cbc_encrypt(blk, len, ctx->contexts); } static void des3_ssh1_decrypt_blk(ssh1_cipher *cipher, void *blk, int len) { - struct des_ssh1_ctx *ctx = FROMFIELD(cipher, struct des_ssh1_ctx, vt); + struct des3_ssh1_ctx *ctx = FROMFIELD(cipher, struct des3_ssh1_ctx, vt); des_3cbc_decrypt(blk, len, ctx->contexts+3); }