]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove unnecessary post-increment
authorJohnnySavages <drokov@rutoken.ru>
Fri, 19 Dec 2025 03:43:41 +0000 (22:43 -0500)
committerNorbert Pocs <norbertp@openssl.org>
Thu, 22 Jan 2026 10:10:42 +0000 (11:10 +0100)
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)

crypto/evp/encode.c

index ec6fa0328423accfa9c1d33852cedd2a8846c016..1f688503d3ac807f83a0d7d0fa58a955ca4d531a 100644 (file)
@@ -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;