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:
parent
64f1815507
commit
3d4656d68b
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr)
|
|||
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;
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue