From 899d150621e08575f0e5324d5ba5d394f00bc91e Mon Sep 17 00:00:00 2001 From: gabrielC Date: Thu, 11 May 2017 11:57:51 +0200 Subject: [PATCH] bug fixes from Fujitsu (bug 26) ---------------------------------------------------------- bug 26 Ttile: g_buffer has only 32 index, but he/she tries to zero clear 1024 index. Bug Location: static uint8_t g_buffer[32]; : memset (g_buffer, 0, 1024); Note: Detected by CppCheck ---------------------------------------------------------- --- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c index 8e201a949b..86cafb89ce 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c @@ -228,7 +228,7 @@ void rlc_am_v9_3_0_test_read_write_bit_field() uint8_t* byte_pos_read = g_buffer; uint16_t read_value; - memset (g_buffer, 0, 1024); + memset (g_buffer, 0, sizeof(g_buffer)); // byte 0 rlc_am_write8_bit_field(&byte_pos_write, &bit_pos_write, 1, 1); rlc_am_write8_bit_field(&byte_pos_write, &bit_pos_write, 1, 0);