memory: Fix buffer overflow when position == NUM_BUFFERS
This commit is contained in:
parent
5fecfe0f42
commit
59c97cfee4
|
@ -1015,7 +1015,7 @@ void *blas_memory_alloc(int procpos){
|
||||||
mypos = WhereAmI();
|
mypos = WhereAmI();
|
||||||
|
|
||||||
position = mypos;
|
position = mypos;
|
||||||
while (position > NUM_BUFFERS) position >>= 1;
|
while (position >= NUM_BUFFERS) position >>= 1;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!memory[position].used && (memory[position].pos == mypos)) {
|
if (!memory[position].used && (memory[position].pos == mypos)) {
|
||||||
|
|
Loading…
Reference in New Issue