Commit c53d784272 for openssl.org
commit c53d7842726d0103696e03d79abd76539c65b101
Author: JohnnySavages <drokov@rutoken.ru>
Date: Thu Dec 18 22:43:41 2025 -0500
Remove unnecessary post-increment
Found by Linux Verification Center (linuxtesting.org) with SVACE.
CLA:trivial
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Jan 22 10:10:51 2026
(Merged from https://github.com/openssl/openssl/pull/29456)
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c
index ec6fa03284..1f688503d3 100644
--- a/crypto/evp/encode.c
+++ b/crypto/evp/encode.c
@@ -684,16 +684,16 @@ static int evp_decodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t,
switch (eof) {
case 2:
- *(t++) = (unsigned char)(l >> 16L) & 0xff;
+ *t = (unsigned char)(l >> 16L) & 0xff;
break;
case 1:
*(t++) = (unsigned char)(l >> 16L) & 0xff;
- *(t++) = (unsigned char)(l >> 8L) & 0xff;
+ *t = (unsigned char)(l >> 8L) & 0xff;
break;
case 0:
*(t++) = (unsigned char)(l >> 16L) & 0xff;
*(t++) = (unsigned char)(l >> 8L) & 0xff;
- *(t++) = (unsigned char)(l) & 0xff;
+ *t = (unsigned char)(l) & 0xff;
break;
}
ret += 3 - eof;