Bug 91356 - Dereference a pointer after null check
Summary: Dereference a pointer after null check
Status: RESOLVED NOTABUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Ashim
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-16 06:02 UTC by Ashim
Modified: 2018-06-04 06:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.