diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-core.c b/src/libsodium/crypto_pwhash/argon2/argon2-core.c index b52b04d3..530778e4 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-core.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2-core.c @@ -67,7 +67,7 @@ store_block(void *output, const block *src) * @param m_cost number of blocks to allocate in the memory * @return ARGON2_OK if @memory is a valid pointer and memory is allocated */ -static int allocate_memory(block_region **memory, uint32_t m_cost); +static int allocate_memory(block_region **region, uint32_t m_cost); static int allocate_memory(block_region **region, uint32_t m_cost) @@ -153,7 +153,7 @@ clear_memory(argon2_instance_t *instance, int clear) /* Deallocates memory * @param memory pointer to the blocks */ -static void free_memory(block_region *memory); +static void free_memory(block_region *region); static void free_memory(block_region *region) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index 9e31352d..40288590 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -163,8 +163,9 @@ salsa20_8(uint32_t B[16]) x[15] ^= R(x[14] + x[13], 18); #undef R } - for (i = 0; i < 16; i++) + for (i = 0; i < 16; i++) { B[i] += x[i]; + } } /** diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c index 139a7df2..cbd68aa1 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c @@ -55,9 +55,9 @@ alloc_region(escrypt_region_t *region, size_t size) aligned = base; #else base = aligned = NULL; - if (size + 63 < size) + if (size + 63 < size) { errno = ENOMEM; - else if ((base = (uint8_t *) malloc(size + 63)) != NULL) { + } else if ((base = (uint8_t *) malloc(size + 63)) != NULL) { aligned = base + 63; aligned -= (uintptr_t) aligned & 63; } diff --git a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c index 8bf3cec8..4b9bf0dc 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c @@ -61,9 +61,9 @@ crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk, } fe25519_1(one_minus_y); fe25519_sub(one_minus_y, one_minus_y, A.Y); - fe25519_invert(one_minus_y, one_minus_y); fe25519_1(x); fe25519_add(x, x, A.Y); + fe25519_invert(one_minus_y, one_minus_y); fe25519_mul(x, x, one_minus_y); fe25519_tobytes(curve25519_pk, x);