ports/139863: [maintainer-update] x11/xcb-util: division by zero bugfix
Nikos Ntarmos
ntarmos at cs.uoi.gr
Fri Oct 23 12:20:02 UTC 2009
>Number: 139863
>Category: ports
>Synopsis: [maintainer-update] x11/xcb-util: division by zero bugfix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 23 12:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Nikos Ntarmos
>Release: FreeBSD 7.2-RELEASE-p4 i386
>Organization:
Computer Science Dept., U. of Ioannina, Greece
>Environment:
System: FreeBSD ace.cs.uoi.gr 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #2: Sat Oct 3 01:59:15 EEST 2009 ntarmos at ace.cs.uoi.gr:/opt/obj/opt/src/sys/ACE i386
>Description:
Ashish Shukla (wahjava at gmail.com) reported a crash with x11-wm/awesome
on amd64. With his help, we narrowed it down to a division by zero going
unnoticed in xcb-util. This is now fixed upstream but there won't be a
new release any time soon, so I'm adding the relevant patch to the port.
>How-To-Repeat:
>Fix:
--- xcb-util-0.3.6_1.diff begins here ---
--- Makefile.orig
+++ Makefile
@@ -7,6 +7,7 @@
PORTNAME= xcb-util
PORTVERSION= 0.3.6
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://xcb.freedesktop.org/dist/
--- files/patch-icccm-icccm.c.orig
+++ files/patch-icccm-icccm.c
@@ -0,0 +1,20 @@
+--- icccm/icccm.c.orig 2009-08-24 11:47:36.000000000 +0300
++++ icccm/icccm.c 2009-10-21 21:01:52.000000000 +0300
+@@ -627,15 +627,13 @@
+ xcb_get_wm_hints_from_reply(xcb_wm_hints_t *hints,
+ xcb_get_property_reply_t *reply)
+ {
+- if(!reply)
++ if(!reply || reply->type != WM_HINTS || reply->format != 32)
+ return 0;
+
+ int length = xcb_get_property_value_length(reply);
+ int num_elem = length / (reply->format / 8);
+
+- if (reply->type != WM_HINTS
+- || reply->format != 32
+- || num_elem < XCB_NUM_WM_HINTS_ELEMENTS - 1)
++ if(num_elem < XCB_NUM_WM_HINTS_ELEMENTS - 1)
+ return 0;
+
+ memcpy(hints, (xcb_size_hints_t *) xcb_get_property_value(reply), length);
--- xcb-util-0.3.6_1.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list