mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
[Bugfix, ASAN] test_mem plugin fix OOB read in read_test()
asan correctly identified an out of bound read in the test_mem plugin This shouldn't cause any issue in normal use since the data isn't used Change-Id: I52acabc4649397f9dd2ba7979f9210529ced2071
This commit is contained in:
parent
1643e0e287
commit
962e1b2e69
1 changed files with 3 additions and 3 deletions
|
@ -132,10 +132,10 @@ static void read_test(volatile int *buf, int buf_size, int loop_cnt)
|
|||
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "memory", "cc"
|
||||
);
|
||||
#else
|
||||
int x;
|
||||
for(int i = 0; i < loop_cnt; i++)
|
||||
int x, i, j;
|
||||
for(i = 0; i < loop_cnt; i++)
|
||||
{
|
||||
for(int j = 0; j < buf_size; j+=4)
|
||||
for(j = 0; j < buf_size - 4; j+=4)
|
||||
{
|
||||
x = buf[j ];
|
||||
x = buf[j+2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue