]> git.codecow.com Git - Monocypher.git/commitdiff
Fix UB (pointer pointing outside of object)
authorLoup Vaillant <loup@loup-vaillant.fr>
Thu, 2 Feb 2023 10:15:26 +0000 (11:15 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Thu, 2 Feb 2023 10:15:26 +0000 (11:15 +0100)
src/optional/monocypher-ed25519.c

index 2dfa9ac8bff1b146382ca5caa26d55bf6a594439..e6692b748d23d246977701b07cc67299eb8a0f96 100644 (file)
@@ -363,7 +363,7 @@ void crypto_sha512_hkdf_expand(u8       *okm,  size_t okm_size,
                COPY(okm, blk, out_size);
 
                not_first = 1;
-               okm      += 64;
+               okm      += out_size;
                okm_size -= out_size;
                ctr++;
        }