From f32ac7b1ab9e3884d019052874dc969c96d0daf5 Mon Sep 17 00:00:00 2001 From: ismagom Date: Wed, 26 Nov 2014 17:30:39 +0000 Subject: [PATCH] Fixed memory bug in CP detection --- lte/phy/lib/sync/src/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lte/phy/lib/sync/src/sync.c b/lte/phy/lib/sync/src/sync.c index 2275880b8..2cfc0e90c 100644 --- a/lte/phy/lib/sync/src/sync.c +++ b/lte/phy/lib/sync/src/sync.c @@ -199,7 +199,7 @@ int sync_sss(sync_t *q, cf_t *input, uint32_t peak_pos) { sss_synch_set_N_id_2(&q->sss, q->N_id_2); if (q->detect_cp) { - if (peak_pos - q->fft_size - CP_EXT(q->fft_size) > 0) { + if (peak_pos - q->fft_size - CP_EXT(q->fft_size) >= 0) { q->cp = detect_cp(q, input, peak_pos); } else { INFO("Not enough room to detect CP length. Peak position: %d\n", peak_pos);