xsel

Program for manipulating the X clipboard
git clone https://git.sinitax.com/kfish/xsel
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 799e2fb3de5897f6f3c7e30851e2ecdffcd2ec89
parent 6e1baec1609a2151815b79dfb826094fec94e668
Author: conrad <conrad@9c49b5d1-7df3-0310-bce2-b7278e68f44c>
Date:   Wed,  5 Dec 2007 06:07:16 +0000

apply patch from Jonas Kölker fixing a segfault in handling of delete atoms
when xsel is running as a daemon (holding the selection).
When it receives a delete atom, the daemon now simply exits.

  This patch fixes a segfault:
  $ echo "hello, world" | ./xsel -i && ./xsel -d
  Segmentation fault


git-svn-id: http://svn.kfish.org/xsel/trunk@191 9c49b5d1-7df3-0310-bce2-b7278e68f44c

Diffstat:
Mxsel.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xsel.c b/xsel.c @@ -590,7 +590,9 @@ wait_selection (Atom selection, Atom request_target) debug_property (D_TRACE, event.xselection.requestor, event.xselection.property, target, length); - if (target == incr_atom) { + if (request_target == delete_atom && value == NULL) { + keep_waiting = False; + } else if (target == incr_atom) { /* Handle INCR transfers */ retval = wait_incr_selection (selection, &event.xselection, *(int *)value);