mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
testcrypt: fix cut-and-paste goof in decrypt_length.
The length test was pasted from the ordinary decrypt function, when it should have been pasted from encrypt_length (which got this right). I've never tried to test those functions before, so I never noticed.
This commit is contained in:
parent
dbc77dbd7a
commit
48708def84
@ -791,7 +791,7 @@ strbuf *ssh_cipher_encrypt_length_wrapper(ssh_cipher *c, ptrlen input,
|
||||
strbuf *ssh_cipher_decrypt_length_wrapper(ssh_cipher *c, ptrlen input,
|
||||
unsigned long seq)
|
||||
{
|
||||
if (input.len % ssh_cipher_alg(c)->blksize)
|
||||
if (input.len != 4)
|
||||
fatal_error("ssh_cipher_decrypt_length: needs exactly 4 bytes");
|
||||
strbuf *sb = strbuf_dup(input);
|
||||
ssh_cipher_decrypt_length(c, sb->u, sb->len, seq);
|
||||
|
Loading…
Reference in New Issue
Block a user