Re: [PATCH:libX11] If XGetImage fails to create image, don't dereference it to bounds check

2018-03-07 Thread Alan Coopersmith
On 03/ 7/18 01:42 PM, Emil Velikov wrote: > On 7 March 2018 at 20:10, Alan Coopersmith > wrote: >> That should be effectively equivalent, just less change in indentation for >> the lines in between. >> > You're correct - it's functionally identical although it seems

Re: [PATCH:libX11] If XGetImage fails to create image, don't dereference it to bounds check

2018-03-07 Thread Emil Velikov
On 7 March 2018 at 20:10, Alan Coopersmith wrote: > On 03/ 7/18 05:36 AM, Emil Velikov wrote: >> Hi Alan, >> >> On 6 March 2018 at 21:47, Alan Coopersmith >> wrote: >>> Reported by gcc 7.3: >>> >>> GetImage.c:110:25: warning: potential

Re: [PATCH:libX11] If XGetImage fails to create image, don't dereference it to bounds check

2018-03-07 Thread Alan Coopersmith
On 03/ 7/18 05:36 AM, Emil Velikov wrote: > Hi Alan, > > On 6 March 2018 at 21:47, Alan Coopersmith > wrote: >> Reported by gcc 7.3: >> >> GetImage.c:110:25: warning: potential null pointer dereference >> [-Wnull-dereference] >> if (planes < 1 || image->height <

Re: [PATCH:libX11] If XGetImage fails to create image, don't dereference it to bounds check

2018-03-07 Thread Emil Velikov
Hi Alan, On 6 March 2018 at 21:47, Alan Coopersmith wrote: > Reported by gcc 7.3: > > GetImage.c:110:25: warning: potential null pointer dereference > [-Wnull-dereference] > if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 || >