MIPS: Jazz: Fix read buffer overflow
Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (pgtbl[i].owner == laddr && i < VDMA_PGTBL_ENTRIES) {
|
while (i < VDMA_PGTBL_ENTRIES && pgtbl[i].owner == laddr) {
|
||||||
pgtbl[i].owner = VDMA_PAGE_EMPTY;
|
pgtbl[i].owner = VDMA_PAGE_EMPTY;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user