From: Matt Turner Date: Sun, 7 Dec 2014 07:04:53 +0000 (-0800) Subject: r200: Avoid out of bounds array access. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2eef9c0b16eb33c32359209cf71317fc42c49404;p=mesa.git r200: Avoid out of bounds array access. Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/r200/r200_sanity.c b/src/mesa/drivers/dri/r200/r200_sanity.c index dd3cf817558..34d83d89b38 100644 --- a/src/mesa/drivers/dri/r200/r200_sanity.c +++ b/src/mesa/drivers/dri/r200/r200_sanity.c @@ -622,7 +622,7 @@ static void init_regs( void ) struct reg_names *tmp; int i; - for (i = 0 ; i < Elements(regs) ; i++) { + for (i = 0 ; i < Elements(reg_names) ; i++) { regs[i].idx = reg_names[i].idx; regs[i].closest = ®_names[i]; regs[i].flags = 0;