diff --git a/dudect/constant.c b/dudect/constant.c index ed252412d..ef3dceb7a 100644 --- a/dudect/constant.c +++ b/dudect/constant.c @@ -50,7 +50,7 @@ void prepare_inputs(uint8_t *input_data, uint8_t *classes) { randombytes(input_data, N_MEASURES * CHUNK_SIZE); for (size_t i = 0; i < N_MEASURES; i++) { - classes[i] = rand() & 1; + classes[i] = randombit(); if (classes[i] == 0) memset(input_data + i * CHUNK_SIZE, 0, CHUNK_SIZE); } diff --git a/dudect/fixture.c b/dudect/fixture.c index fb60681a8..3c81e8347 100644 --- a/dudect/fixture.c +++ b/dudect/fixture.c @@ -155,7 +155,7 @@ int64_t before_ticks[N_MEASURES]; int64_t after_ticks[N_MEASURES]; int64_t exec_times[N_MEASURES]; uint8_t classes[N_MEASURES]; -uint8_t input_data[N_MEASURES]; +uint8_t input_data[N_MEASURES * CHUNK_SIZE]; FILE *dudect_out; static report_state_t dudect_main(int mode) {