Bug 91356

Summary: Dereference a pointer after null check
Product: Wayland Reporter: Ashim <ashim.shah>
Component: waylandAssignee: Ashim <ashim.shah>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ashim 2015-07-16 06:02:46 UTC
Overview:
---------
Dereference a pointer after null check
 

Description:
-----------

File: http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-server.c
Line: 783

client->display_resource is NULL and client is passed as argument as below
wl_client_post_no_memory(client);

Line: 515
client->display_resource (NULL) is passed as argument
wl_resource_post_error(client->display_resource, WL_DISPLAY_ERROR_NO_MEMORY, "no memory");

Line: 210
struct wl_client *client = resource->client;
resource is NULL so dereferencing a NULL pointer.

Expected:
--------
NULL checking required before dereferencing
Comment 1 Ashim 2015-08-25 04:26:29 UTC
The patch for this Bug was submitted.
and the link for the patch is as follows:

http://lists.freedesktop.org/archives/wayland-devel/2015-July/023723.html
Comment 2 Daniel Stone 2018-06-04 06:59:08 UTC
Closing this bug, since the patch was discussed on the list.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.