Re: Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-30 Thread ASHIM SINGH SHAH
lient->display_resource) return; I think patch is correct in above sense. Regards, Ashim Singh Shah --- Original Message --- Sender : Marek Chalupa Date : Jul 23, 2015 11:33 (GMT+05:30) Title : Re: [PATCH] wayland-server: Fix null pointer dereferencing On 07/16/2015 09:37 AM, Marek

Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-22 Thread Marek Chalupa
On 07/16/2015 09:37 AM, Marek Chalupa wrote: On 07/16/2015 09:27 AM, Marek Chalupa wrote: Nice catch (some static analysis tool? :). I'm not sure if this is the right way to fix it, though. If somebody calls wl_resource_post_error with NULL resource, it is his fault and program should crash

Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-16 Thread Marek Chalupa
On 07/16/2015 09:27 AM, Marek Chalupa wrote: Nice catch (some static analysis tool? :). I'm not sure if this is the right way to fix it, though. If somebody calls wl_resource_post_error with NULL resource, it is his fault and program should crash to reveal this error. So the right fix in this

Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-16 Thread Marek Chalupa
On 07/16/2015 09:22 AM, Giulio Camuffo wrote: 2015-07-16 9:27 GMT+03:00 Ashim : Initialising 'wl_client *client = NULL' and checking 'resource' for NULL and returning if found. This patch will avoid dereferencing of 'resource' if NULL I think in this case passing a NULL resource to wl_resou

Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-16 Thread Marek Chalupa
Nice catch (some static analysis tool? :). I'm not sure if this is the right way to fix it, though. If somebody calls wl_resource_post_error with NULL resource, it is his fault and program should crash to reveal this error. So the right fix in this case would be to delete wl_client_post_no_mem

Re: [PATCH] wayland-server: Fix null pointer dereferencing

2015-07-16 Thread Giulio Camuffo
2015-07-16 9:27 GMT+03:00 Ashim : > Initialising 'wl_client *client = NULL' and checking 'resource' for NULL and > returning if found. > This patch will avoid dereferencing of 'resource' if NULL I think in this case passing a NULL resource to wl_resource_post_error() is a programming mistake, and