CentOS6 fixes

This commit is contained in:
lucaderi 2020-06-08 00:01:28 +02:00
parent 4300c3f3f7
commit cd62591ade
3 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ GIT_COMMITS=@GIT_COMMITS@
CC?=gcc
DEBUG?=-g3
OPTIMIZATION?=-O3 -march=native
OPTIMIZATION?=-O3 #-march=native
WARN?=-Wall
#Ultrasparc64 users experiencing SIGBUS should try the following gcc options

View File

@ -1,6 +1,6 @@
CC?=gcc
DEBUG?=-g3
OPTIMIZATION?=-O2 -march=native
OPTIMIZATION?=-O2 #-march=native
WARN?=-Wall
INSTALL=install

View File

@ -54,7 +54,9 @@ static int transop_deinit_speck(n2n_trans_op_t *arg) {
static void set_speck_iv(transop_speck_t *priv, n2n_speck_ivec_t ivec) {
// keep in mind the following condition: N2N_SPECK_IVEC_SIZE % sizeof(rand_value) == 0 !
uint32_t rand_value;
for (uint8_t i = 0; i < N2N_SPECK_IVEC_SIZE; i += sizeof(rand_value)) {
uint8_t i;
for (i = 0; i < N2N_SPECK_IVEC_SIZE; i += sizeof(rand_value)) {
rand_value = rand(); // CONCERN: rand() is not considered cryptographicly secure, REPLACE later
memcpy(ivec + i, &rand_value, sizeof(rand_value));
}