Browse Source

memory: Fix buffer overflow when position == NUM_BUFFERS

tags/v0.2.20^2
James Cowgill 8 years ago
parent
commit
59c97cfee4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      driver/others/memory.c

+ 1
- 1
driver/others/memory.c View File

@@ -1015,7 +1015,7 @@ void *blas_memory_alloc(int procpos){
mypos = WhereAmI();

position = mypos;
while (position > NUM_BUFFERS) position >>= 1;
while (position >= NUM_BUFFERS) position >>= 1;

do {
if (!memory[position].used && (memory[position].pos == mypos)) {


Loading…
Cancel
Save