[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.4.4.svn151842-2-56-g01ac4a2
Mirco Bauer
meebey at meebey.net
Fri Jun 25 00:44:28 UTC 2010
The following commit has been merged in the master branch:
commit f6745b9b203fa20aee2166a212a6a7e39316cb27
Author: Andy Stührk <andysmuell at hammerhartes.de>
Date: Fri Jun 25 01:55:09 2010 +0200
XplatUIX11.WorkingArea can segfault if the WM does not support _NET_WORKAREA
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".
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
index a71d8c6..e89c4e3 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
@@ -2488,7 +2488,7 @@ namespace System.Windows.Forms {
XFree(prop);
XGetWindowProperty(DisplayHandle, RootWindow, _NET_WORKAREA, IntPtr.Zero, new IntPtr (256), false, (IntPtr)Atom.XA_CARDINAL, out actual_atom, out actual_format, out nitems, out bytes_after, ref prop);
- if ((long)nitems < 4 * current_desktop) {
+ if ((long)nitems < 4 * (current_desktop + 1)) {
goto failsafe;
}
--
mono
More information about the Pkg-mono-svn-commits
mailing list