Re: [Mesa-dev] [PATCH] egl: use unsigned int index when iterating over attrib_list

2016-09-27 Thread Emil Velikov
On 27 September 2016 at 16:18, Eric Engestrom wrote: > On Tue, Sep 27, 2016 at 04:10:53PM +0200, Nicolai Hähnle wrote: >> On 27.09.2016 14:40, Emil Velikov wrote: >> > From: Emil Velikov >> > >> > Otherwise one can overflow the signed variable and (attempt to) cause >> > all sorts of strange beha

Re: [Mesa-dev] [PATCH] egl: use unsigned int index when iterating over attrib_list

2016-09-27 Thread Eric Engestrom
On Tue, Sep 27, 2016 at 04:10:53PM +0200, Nicolai Hähnle wrote: > On 27.09.2016 14:40, Emil Velikov wrote: > > From: Emil Velikov > > > > Otherwise one can overflow the signed variable and (attempt to) cause > > all sorts of strange behaviour. > > As long as we're worrying about such things, sho

Re: [Mesa-dev] [PATCH] egl: use unsigned int index when iterating over attrib_list

2016-09-27 Thread Nicolai Hähnle
On 27.09.2016 14:40, Emil Velikov wrote: From: Emil Velikov Otherwise one can overflow the signed variable and (attempt to) cause all sorts of strange behaviour. As long as we're worrying about such things, shouldn't it really be a size_t then? With that, Reviewed-by: Nicolai Hähnle Chee

[Mesa-dev] [PATCH] egl: use unsigned int index when iterating over attrib_list

2016-09-27 Thread Emil Velikov
From: Emil Velikov Otherwise one can overflow the signed variable and (attempt to) cause all sorts of strange behaviour. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/egl_dri2.c | 2 +- src/egl/main/eglconfig.c| 3 ++- src/egl/main/eglcontext.c | 3 ++- src/egl/main/egldis