提交 3d4656d6 编写于 作者: R Roel Kluin 提交者: Ralf Baechle

MIPS: Jazz: Fix read buffer overflow

Check whether index is within bounds before testing the element.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 64f18155
...@@ -190,7 +190,7 @@ int vdma_free(unsigned long laddr) ...@@ -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++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册