Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60581 - xclip can't handle input of >4096 bytes.
Summary: xclip can't handle input of >4096 bytes.
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-16 12:41 UTC by bugs.gentoo.org
Modified: 2005-07-09 15:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Doesn't seg fault, makes me smile. (xclib.segv.patch,1.34 KB, patch)
2005-07-09 15:17 UTC, Rich Paul
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.gentoo.org 2004-08-16 12:41:37 UTC
'dd if=/dev/zero bs=5k count=1 | xclip; xclip -out' gives a segmentation fault (in malloc.c). 4096 bytes is OK, 4097 gives a segmentation fault.



Reproducible: Always
Steps to Reproduce:
1.dd if=/dev/zero bs=5k count=1 | xclip; xclip -out
2.
3.

Actual Results:  
$ dd if=/dev/zero bs=5k count=1 | xclip; xclip -out
1+0 records in
1+0 records out
Segmentation fault


Expected Results:  
Take and give the input.


[I--] [  ] x11-misc/xclip-0.08 (0)

Gentoo Base System version 1.5.2
Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r0,
2.6.8-rc2)
=================================================================
System uname: 2.6.8-rc2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -g -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /usr/X11R6/lib/X11 /etc/env.d"
CXXFLAGS="-O2 -g -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache nostrip sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib acpi acpi4linux alsa avi berkdb bidi bindist bonobo caps cddb
cdr chroot crypt cscope cups curl dga dillo directfb dnd dvd emacs encode evo
faad fam fbcon ffmpeg fftw flac flash foomaticdb gb gdbm gif gnome gphoto2 gpm
gstreamer gtk gtk2 gtkhtml guile imap imlib irda jack java javascript jbig jikes
joystick jpeg kde lcms libdsk libg++ libgda libwww linguas_en linguas_nl lirc
ltsp mad mbox memlimit mikmod mmx mng motif mozilla mozp3p mozsvg mpeg msn music
ncurses nls offensive ofx oggvorbis opengl oss pam pdflib perl pic png ppds
python qt quicktime quotes radeon readline ruby samba scanner sdl skey sox
speedo speex spell sse ssl stencil-buffer t1lib tcltk tcpd theora tiff
transparent-proxy truetype type1 usb v4l vim-with-x wmf x86 xchattext xemacs
xine xinerama xml2 xmms xosd xv xvid yahoo zlib zvbi"
Comment 1 Markus Nigbur (RETIRED) gentoo-dev 2004-11-07 02:56:08 UTC
You have to define an upper limit and the author of the package decided 4096 bytes should be enough.
If you really need more you can patch the package yourself, or contact the upstream developer.

--- xcdef.h_    2004-11-07 11:54:57.593378752 +0100
+++ xcdef.h     2004-11-07 11:55:21.396760088 +0100
@@ -36,4 +36,4 @@
 #define ST "T" /* true  */
 
 /* maximume size to read/write to/from a property at once in bytes */
-#define XC_CHUNK 4096
+#define XC_CHUNK xxxx
Comment 2 Rich Paul 2005-07-09 15:17:42 UTC
Created attachment 63036 [details, diff]
Doesn't seg fault, makes me smile.

Pretty simple patch %s/ltxt/(*txt)/g, to remove an inconsistently initialized
alias for an argument.
Comment 3 Rich Paul 2005-07-09 15:21:12 UTC
Comment on attachment 63036 [details, diff]
Doesn't seg fault, makes me smile.

Bummer ... it was offering to let me reopen the bug when I posted the patch,
but it doesn't like me anymore.  Hope somebody sees it anyway.