diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-07-31 14:52:51 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-08-03 18:52:47 +0200 |
commit | 3d4656d68bad84604f5b01f93e066cd02f77154b (patch) | |
tree | cf1d8a171d7e9b39d20b671cf3079660e9501a1a /arch/mips/jazz/jazzdma.c | |
parent | MIPS: Use DIV_ROUND_CLOSEST (diff) | |
download | linux-3d4656d68bad84604f5b01f93e066cd02f77154b.tar.xz linux-3d4656d68bad84604f5b01f93e066cd02f77154b.zip |
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>
Diffstat (limited to 'arch/mips/jazz/jazzdma.c')
-rw-r--r-- | arch/mips/jazz/jazzdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index f0fd636723be..0d64d0f46418 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -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++; } |