Skip to contentSkip to conversation

MIPS: Read buffer overflow

PATCH Applied Roel Kluin 2 participants 2 messages Jul 31, 2009 – Aug 2, 2009 MIPS

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 MIPS: Read buffer overflow

Check whether index is within bounds before testing the element.

---

arch/mips/jazz/jazzdma.c +1 -1
index f0fd636..0d64d0f 100644
@@ -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++;
 	}
Applied
#1 lore raw

On Fri, Jul 31, 2009 at 02:52:51PM +0200, Roel Kluin wrote:

Thanks, applied!

Ralf