From 7b9e254a8b70df5eaad14e6eebc81c3fa6603040 Mon Sep 17 00:00:00 2001 From: Leon Date: Mon, 27 May 2019 20:21:05 +0200 Subject: [PATCH] fix reading outside buffer --- crypto_kem/ledakemlt12/clean/dfr_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto_kem/ledakemlt12/clean/dfr_test.c b/crypto_kem/ledakemlt12/clean/dfr_test.c index c24e0d9a..bcea824c 100644 --- a/crypto_kem/ledakemlt12/clean/dfr_test.c +++ b/crypto_kem/ledakemlt12/clean/dfr_test.c @@ -57,11 +57,9 @@ int PQCLEAN_LEDAKEMLT12_CLEAN_DFR_test(POSITION_T LSparse[N0][DV * M]) { intersectionval++; firstidx++; secondidx++; - } - if ( LSparse_loc[i][firstidx] > rotated_column[secondidx] ) { + } else if ( LSparse_loc[i][firstidx] > rotated_column[secondidx] ) { secondidx++; - } - if ( LSparse_loc[i][firstidx] < rotated_column[secondidx] ) { + } else { /*if ( LSparse_loc[i][firstidx] < rotated_column[secondidx] ) */ firstidx++; } }