Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP1:GA
xf86-input-vmmouse.542
U_dont-dereference-pmse-if-it-hasnt-been-initia...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_dont-dereference-pmse-if-it-hasnt-been-initialised.patch of Package xf86-input-vmmouse.542
From 9a815289f9df5577f5fdf4c2463b614a93819b7d Mon Sep 17 00:00:00 2001 From: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon, 11 Feb 2013 15:27:26 +1000 Subject: [PATCH 1/7] Don't de-reference pMse if it hasn't been initialised yet If the device fails PreInit, UnInit is still called by pMse may be NULL. Dereferencing it is a bad idea. Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> --- src/vmmouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vmmouse.c b/src/vmmouse.c index fb053c2..523f4fd 100644 --- a/src/vmmouse.c +++ b/src/vmmouse.c @@ -808,11 +808,13 @@ static void VMMouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { MouseDevPtr pMse = pInfo->private; - VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv; xf86Msg(X_INFO, "VMWARE(0): VMMouseUnInit\n"); - free(mPriv); + if (pMse) { + VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv; + free(mPriv); + } xf86DeleteInput(pInfo, flags); } -- 2.1.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor