! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
XGetExtensionVersion return value misinterpreted causing segmentation fault w...
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Settings Helper

Comments

Description SP 2011-02-03 05:36:45 CET
In the code snippet below the "version" pointer value is compared against NULL when it should be compared against NoSuchExtension (defined as "1" and not "0" in XI.h).

I'm using libXi 1.4.1 and xfce-settings 4.8.1

    /* query the extension version */
    version = XGetExtensionVersion (xdisplay, INAME);

    /* check for Xi */
        printf("-->%p %d\n", version, version);
    if (version == NoSuchExtension || !version->present)
Comment 1 Jérôme Guelfucci editbugs 2011-02-03 18:03:58 CET
I just pushed a fix for this. This were a little bit complex: you need to check for NULL then you can cast to a long to compare to NoSuchExtension. Thanks for pointing this problem out.
Comment 2 Nick Schermer editbugs 2011-02-05 23:14:59 CET
You never pushed this I think, at least, I don't see the commit.
Comment 3 Jérôme Guelfucci editbugs 2011-02-05 23:39:09 CET
Yeah, thanks for spotting this. Just actually pushed.

Bug #7229

Reported by:
SP
Reported on: 2011-02-03
Last modified on: 2011-02-05

People

Assignee:
Stephan Arts
CC List:
3 users

Version

Attachments

Additional information