Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
xorg-x11-server.1965
u_dri2_fix-detection-of-wrong-prime_id-in-getsc...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File u_dri2_fix-detection-of-wrong-prime_id-in-getscreenprime.patch of Package xorg-x11-server.1965
Subject: [PATCH] dri2: Fix wrong prime_id detection in GetScreenPrime. Author: Michal Srb <msrb@suse.com> Patch-Mainline: To be upstreamed References: bnc#846352 Checking the iterating variable ("slave") against null can not detect if the xorg_list_for_each_entry finished without break being invoked - it will be always non-null. This caused segfault whenever someone tried to use DRI_PRIME with incorrect id. Restructurize it to work as expected. diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 729a323..5b2c662 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -156,11 +156,9 @@ GetScreenPrime(ScreenPtr master, int prime_id) ds = DRI2GetScreen(slave); if (ds->prime_id == prime_id) - break; + return slave; } - if (!slave) - return master; - return slave; + return master; } static DRI2ScreenPtr
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