From nobody@FreeBSD.org  Wed Dec  1 03:06:33 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BEECD1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Dec 2010 03:06:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 93D7F8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Dec 2010 03:06:33 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oB136Wii093382
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Dec 2010 03:06:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oB136Wh7093364;
	Wed, 1 Dec 2010 03:06:32 GMT
	(envelope-from nobody)
Message-Id: <201012010306.oB136Wh7093364@red.freebsd.org>
Date: Wed, 1 Dec 2010 03:06:32 GMT
From: vermaden <vermaden@interia.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: x11/wmctrl segfaults with -d option on openbox
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152731
>Category:       ports
>Synopsis:       x11/wmctrl segfaults with -d option on openbox
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    flz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 01 03:10:11 UTC 2010
>Closed-Date:    Mon Dec 20 11:14:04 UTC 2010
>Last-Modified:  Mon Dec 20 11:20:11 UTC 2010
>Originator:     vermaden
>Release:        FreeBSD 8.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD e6400 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #0: Mon Oct 18 17:35:54 CEST 2010     root@e6400:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
I have just build latest version from Ports, same from package:

% wmctrl -d

GLib-ERROR **: gmem.c:157: failed to allocate 18049582881570848 bytes
aborting...
zsh: abort      wmctrl -d

>How-To-Repeat:
% wmctrl -d
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->flz 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 1 03:10:20 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152731 

From: vermaden <vermaden@interia.pl>
To: bug-followup@FreeBSD.org, vermaden@interia.pl
Cc:  
Subject: Re: ports/152731: x11/wmctrl segfaults with -d option on openbox
Date: Wed, 01 Dec 2010 04:29:35 +0100

 This patch solves the problem (found on the net):
 
 --- main.c.orig 2005-01-29 04:31:33.000000000 +0100
 +++ main.c  2009-01-31 16:52:09.000000000 +0100
 @@ -1441,6 +1441,8 @@
 
      /* null terminate the result to make string handling easier */
      tmp_size = (ret_format / 8) * ret_nitems;
 +    /* Correct 64 Architecture implementation of 32 bit data */
 +    if(ret_format==32) tmp_size *= sizeof(long)/4;
      ret = g_malloc(tmp_size + 1);
      memcpy(ret, ret_prop, tmp_size);
      ret[tmp_size] = '\0';
 
 Regards,
 vermaden
 
 
 ----------------------------------------------------------------------
 Gra dla duzych chlopcow.
 http://linkint.pl/f2717
 
State-Changed-From-To: open->closed 
State-Changed-By: flz 
State-Changed-When: Mon Dec 20 11:14:03 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152731 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/152731: commit references a PR
Date: Mon, 20 Dec 2010 11:13:50 +0000 (UTC)

 flz         2010-12-20 11:13:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     x11/wmctrl           Makefile 
   Added files:
     x11/wmctrl/files     patch-main.c 
   Log:
   Fix -d on openbox.
   
   PR:             ports/152731
   Submitted by:   vermaden <vermaden@interia.pl>
   
   Revision  Changes    Path
   1.10      +1 -1      ports/x11/wmctrl/Makefile
   1.1       +12 -0     ports/x11/wmctrl/files/patch-main.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
