#50 tests/test_functions.c defines array with too few elements

open
nobody
None
5
2013-02-18
2013-02-18
No

While compiling your code with our research compiler infrastructure we noticed the following problem:

- libcgrouptest.h declares extern char info[NUM_MSGS][SIZE]; with NUM_MSGS=20 and SIZE=100
- test_functions.c defines char info[][SIZE] = { ... } with only 19 elements.

Any access to info[NUM_MSGS-1], as acceptable according to the declaration in the header file, would thus be an invalid memory access.

Best,
Michael

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks