From 3f370438e5b9ed4ad5abee230e9f1efc7a43380e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 29 Jan 2021 18:59:50 +0100 Subject: [PATCH] cppchecker noticed ct vs pt is swapped. Question is where was the error introduced? pt (plaintext) ct (cryptotext) --- common/cryptorf/cryptolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cryptorf/cryptolib.c b/common/cryptorf/cryptolib.c index bf597317b..a59f4109a 100644 --- a/common/cryptorf/cryptolib.c +++ b/common/cryptorf/cryptolib.c @@ -307,7 +307,7 @@ static void cm_crypt(const CryptoAction ca, const uint8_t offset, const uint8_t } } -void cm_encrypt(const uint8_t offset, const uint8_t len, const uint8_t *ct, uint8_t *pt, crypto_state s) { +void cm_encrypt(const uint8_t offset, const uint8_t len, const uint8_t *pt, uint8_t *ct, crypto_state s) { next_n(true, 5, 0, s); next(true, 0, s); cm_crypt(CA_ENCRYPT, offset, len, ct, pt, s);