mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
Fixed out of bounds access in astrobwt/v2
This commit is contained in:
parent
f25e65b5ac
commit
65dbded9c4
1 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ static NOINLINE void sort_indices(uint32_t N, const uint8_t* RESTRICT v, uint32_
|
|||
|
||||
uint16_t* a = (uint16_t*)indices;
|
||||
uint16_t* b = (uint16_t*)indices;
|
||||
uint16_t* e = (uint16_t*)(indices + (N - (unroll - 1)));
|
||||
uint16_t* e = ((uint16_t*)indices) + (N - (unroll - 1));
|
||||
|
||||
for (; a < e; a += unroll, b += unroll * 2) {
|
||||
ITER(0); ITER(1); ITER(2); ITER(3); ITER(4); ITER(5); ITER(6); ITER(7);
|
||||
|
@ -192,7 +192,7 @@ static NOINLINE void sort_indices(uint32_t N, const uint8_t* RESTRICT v, uint32_
|
|||
ITER(24); ITER(25); ITER(26); ITER(27); ITER(28); ITER(29); ITER(30); ITER(31);
|
||||
}
|
||||
|
||||
e = (uint16_t*)(indices + N);
|
||||
e = ((uint16_t*)indices) + N;
|
||||
for (; a < e; ++a, b += 2) {
|
||||
ITER(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue