From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 19 23:00:22 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6CD1065676 for ; Tue, 19 Apr 2011 23:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DE7E78FC17 for ; Tue, 19 Apr 2011 23:00:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3JN0L5K081303 for ; Tue, 19 Apr 2011 23:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3JN0LGq081302; Tue, 19 Apr 2011 23:00:21 GMT (envelope-from gnats) Resent-Date: Tue, 19 Apr 2011 23:00:21 GMT Resent-Message-Id: <201104192300.p3JN0LGq081302@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcin Cieslak Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6FEE106564A; Tue, 19 Apr 2011 22:57:09 +0000 (UTC) (envelope-from saper@saper.info) Received: from l.saper.info (l.saper.info [IPv6:2001:41d0:1:d467::1000]) by mx1.freebsd.org (Postfix) with ESMTP id 07C5C8FC15; Tue, 19 Apr 2011 22:57:08 +0000 (UTC) Received: from l.saper.info (uucp@localhost [127.0.0.1]) by l.saper.info (8.14.4/8.14.4) with ESMTP id p3JMuT6g034835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 22:56:29 GMT (envelope-from saper@saper.info) Received: (from uucp@localhost) by l.saper.info (8.14.4/8.14.4/Submit) with UUCP id p3JMuTmt034834; Tue, 19 Apr 2011 22:56:29 GMT (envelope-from saper@saper.info) Received: from radziecki.saper.info (localhost [127.0.0.1]) by radziecki.saper.info (8.14.4/8.14.4) with ESMTP id p3JMuOw1072027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Apr 2011 22:56:24 GMT (envelope-from saper@saper.info) Received: (from saper@localhost) by radziecki.saper.info (8.14.4/8.14.4/Submit) id p3JMuNSH071992; Tue, 19 Apr 2011 22:56:23 GMT (envelope-from saper) Message-Id: <201104192256.p3JMuNSH071992@radziecki.saper.info> Date: Tue, 19 Apr 2011 22:56:23 GMT From: Marcin Cieslak To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: thierry@FreeBSD.org Subject: ports/156509: [PATCH] x11/rxvt-unicode: fix BadAtom in X_ChangeProperty when pasting from some clients X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2011 23:00:22 -0000 >Number: 156509 >Category: ports >Synopsis: [PATCH] x11/rxvt-unicode: fix BadAtom in X_ChangeProperty when pasting from some clients >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 19 23:00:21 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Marcin Cieslak >Release: FreeBSD 9.0-CURRENT amd64 >Organization: http://saper.info >Environment: System: FreeBSD radziecki.saper.info 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r219785M: Mon Mar 21 11:40:40 CET >Description: I have found a bug in rxvt derivatives: https://sourceforge.net/tracker/?func=detail&aid=3289852&group_id=221&atid=100221 http://thread.gmane.org/gmane.comp.terminal-emulators.rxvt-unicode.general/958 Added file(s): - files/patch-src::screen.C Port maintainer (thierry@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: Try to paste some text from rxvt-unicode into example1 client from: http://michael.toren.net/mirrors/doc/X-copy+paste.txt you should get: urxvt: An X Error occurred, trying to continue after report. urxvt: X Error of failed request: BadAtom (invalid Atom parameter) urxvt: Major opcode of failed request: 18 urxvt: (which is X_ChangeProperty) urxvt: Atom id in failed request: 0x0 urxvt: Serial number of failed request: 347 in a shell that is parent to rxvt-unicode (where rxvt-unicode was started from). >Fix: --- rxvt-unicode-9.10_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode.orig/files/patch-src::screen.C /usr/ports/x11/rxvt-unicode/files/patch-src::screen.C --- /usr/ports/x11/rxvt-unicode.orig/files/patch-src::screen.C 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/x11/rxvt-unicode/files/patch-src::screen.C 2011-04-19 23:58:32.000000000 +0200 @@ -0,0 +1,73 @@ +--- src/screen.C.orig 2011-04-19 23:53:53.000000000 +0200 ++++ src/screen.C 2011-04-19 23:57:02.000000000 +0200 +@@ -3619,6 +3619,7 @@ + rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW + { + XSelectionEvent ev; ++ Atom property; + + ev.type = SelectionNotify; + ev.property = None; +@@ -3628,6 +3629,16 @@ + ev.target = rq.target; + ev.time = rq.time; + ++ /* ICCCM: 2.2. Responsibilities of the Selection Owner ++ * SelectionRequest: ++ * If the specified property is None , the requestor ++ * an obsolete client. Owners are encouraged ++ * to support these clients by using the specified ++ * target atom as the property name to be used for ++ * the reply. ++ */ ++ property = (rq.property == 0) ? rq.target : rq.property; ++ + if (rq.target == xa[XA_TARGETS]) + { + Atom target_list[6]; +@@ -3642,10 +3653,10 @@ + *target++ = xa[XA_UTF8_STRING]; + #endif + +- XChangeProperty (dpy, rq.requestor, rq.property, XA_ATOM, ++ XChangeProperty (dpy, rq.requestor, property, XA_ATOM, + 32, PropModeReplace, + (unsigned char *)target_list, target - target_list); +- ev.property = rq.property; ++ ev.property = property; + } + #if TODO // TODO + else if (rq.target == xa[XA_MULTIPLE]) +@@ -3655,15 +3666,15 @@ + #endif + else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == XA_PRIMARY && selection.text) + { +- XChangeProperty (dpy, rq.requestor, rq.property, rq.target, ++ XChangeProperty (dpy, rq.requestor, property, rq.target, + 32, PropModeReplace, (unsigned char *)&selection_time, 1); +- ev.property = rq.property; ++ ev.property = property; + } + else if (rq.target == xa[XA_TIMESTAMP] && rq.selection == xa[XA_CLIPBOARD] && selection.clip_text) + { +- XChangeProperty (dpy, rq.requestor, rq.property, rq.target, ++ XChangeProperty (dpy, rq.requestor, property, rq.target, + 32, PropModeReplace, (unsigned char *)&clipboard_time, 1); +- ev.property = rq.property; ++ ev.property = property; + } + else if (rq.target == XA_STRING + || rq.target == xa[XA_TEXT] +@@ -3744,10 +3755,10 @@ + ct.encoding = target; + } + +- XChangeProperty (dpy, rq.requestor, rq.property, ++ XChangeProperty (dpy, rq.requestor, property, + ct.encoding, 8, PropModeReplace, + ct.value, (int)ct.nitems); +- ev.property = rq.property; ++ ev.property = property; + + if (freect) + XFree (ct.value); --- rxvt-unicode-9.10_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: