Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d4656d6 authored by Roel Kluin's avatar Roel Kluin Committed by Ralf Baechle
Browse files

MIPS: Jazz: Fix read buffer overflow



Check whether index is within bounds before testing the element.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 64f18155
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;
	}