Re: [Qemu-devel] [PATCH] display: check irq handler index before access

2017-12-11 Thread P J P
+-- On Mon, 11 Dec 2017, Peter Maydell wrote --+ | It would be more sensible to just mask off the top bits of | 'level' before starting the loop, rather than checking every | time around the loop: |level &= MAKE_64BIT_MASK(0, TC6493XB_GPIOS); Sent a revised patch v1. Thank you. -- Prasad J Pan

Re: [Qemu-devel] [PATCH] display: check irq handler index before access

2017-12-11 Thread Peter Maydell
On 11 December 2017 at 10:55, P J P wrote: > From: Prasad J Pandit > > The ctz32() routine could return value greater than > TC6393XB_GPIOS=16. This could lead to an OOB array access. > Add check to avoid it. > > Reported-by: Moguofang > Signed-off-by: Prasad J Pandit > --- > hw/display/tc6393

[Qemu-devel] [PATCH] display: check irq handler index before access

2017-12-11 Thread P J P
From: Prasad J Pandit The ctz32() routine could return value greater than TC6393XB_GPIOS=16. This could lead to an OOB array access. Add check to avoid it. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/display/tc6393xb.c | 4 1 file changed, 4 insertions(+) diff --git a/h