зеркало из https://github.com/github/putty.git
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!
This commit is contained in:
Родитель
91a624fb70
Коммит
e71798a265
4
sshdes.c
4
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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче