[Mono-bugs] [Bug 494234] New: XplatUIX11.WorkingArea can segfault if the WM does not support _NET_WORKAREA

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Apr 12 07:03:20 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=494234


           Summary: XplatUIX11.WorkingArea can segfault if the WM does not
                    support _NET_WORKAREA
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andysmuell at hammerhartes.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=285320)
 --> (http://bugzilla.novell.com/attachment.cgi?id=285320)
Patch which corrected error checking for the XGetWindowProperty call

The result checking for the call to XGetWindowProperty for the _NET_WORKAREA
property in XplatUIX11.WorkingArea's getter is incorrect, which can lead to a
segfault. Whether the call succeeded or not is checked by "if ((long)nitems < 4
* current_desktop)". The problems is that the count of desktops starts by 0, so
`nitems` must have at least a value of "4 * (current_desktop + 1)" and not "4 *
current_desktop".

The attached patch against trunk/mcs (r131534) fixes the error check.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list