Your message dated Sun, 23 Jul 2017 19:53:13 +0000
with message-id <[email protected]>
and subject line Bug#758599: fixed in xsel 1.2.0-3
has caused the Debian Bug report #758599,
regarding xsel: memory corruption when selection > 4000 byte
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
758599: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758599
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xsel
Version: 1.2.0-1
Severity: important

Hi,

when the selection is larger than 4000 bytes, xsel gives sometimes the
expected output with trash appended, sometimes no output at all, in a
nondeterministic way.

Expected behaviour with 4000 bytes of input:

$ yes a | tr -d '\n' | head -c 4000 | xsel ; xsel | wc -c
4000

Now run with more than 4000, a few times to see different error kinds:

$ yes a | tr -d '\n' | head -c 4001 | xsel ; xsel | wc -c
0
$ yes a | tr -d '\n' | head -c 4001 | xsel ; xsel | wc -c
4009

I looked into the code and there is actually a 4000 hardcoded in it. It
is the largest property size that can be transmitted in one event.

The bug must hide somewhere in the handling of the incremental
retrieval. I've not tried hard, so didn't find the bug.

--

While at it, I found that the program is in a bad state unfortunately.

Some examples which turned up in short time: Memory management is
broken, so it's not debuggable using valgrind. The get_homedir()
function returns a char * either to an environment variable or to
strdup()ed memory. There are a few locations where the program sometimes
allocates 0 bytes and then aborts thinking something went wrong (I've
reproduced it).  These are mostly of the fixable sort, but they also
serve as a good illustration of the program state...

Another problem is that selections are represented as char * so the
following behaviour isn't surprising:

$ head -c 42 /dev/zero | xsel ; xsel | wc -c
0

Replace by xclip -i / xclip -o to get the expected 42.

Maybe this package should be deprecated? xclip seems to work better in
half the lines of code. I don't think xsel does a reliable job and it is
very large for what it does. I feel unsafe having relied on it during
several years.

Jens

--- End Message ---
--- Begin Message ---
Source: xsel
Source-Version: 1.2.0-3

We believe that the bug you reported is fixed in the latest version of
xsel, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josue Ortega <[email protected]> (supplier of updated xsel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 23 Jul 2017 13:17:51 -0600
Source: xsel
Binary: xsel
Architecture: source amd64
Version: 1.2.0-3
Distribution: unstable
Urgency: medium
Maintainer: Josue Ortega <[email protected]>
Changed-By: Josue Ortega <[email protected]>
Description:
 xsel       - command-line tool to access X clipboard and selection buffers
Closes: 758599 869293
Changes:
 xsel (1.2.0-3) unstable; urgency=medium
 .
   * New Maintainer (Closes: #869293).
   * Adds 40_fix-large-pastes.patch in order to fix memory corruption in large
     selections, thanks to Carlos Maddela <[email protected]>
     for profivding the patch (Closes: #758599).
   * debian/control: Updates Vcs-* to use secure URI.
   * debian/copyright updated to Machine Readable format (DEP-5).
   * Standards-Version bumped to 4.0.0, no changes needed.
   * debian/rules: Adds hardening=+all flag to DEB_BUILD_MAINT_OPTIONS.
Checksums-Sha1:
 efece7a56785b952e7daef576b91cc8ab9d74a3e 1870 xsel_1.2.0-3.dsc
 fb67a36c1850f039c3f11498b1f811f51d618943 3784 xsel_1.2.0-3.debian.tar.xz
 5013a4c77d79d7fcda6aa28f6b3641cecee30e86 32952 xsel-dbgsym_1.2.0-3_amd64.deb
 3143eba4d9a15777f4234e34aa4e3023724586e2 6669 xsel_1.2.0-3_amd64.buildinfo
 0577141ba172284b790ec955a75305e4b20e8a54 19244 xsel_1.2.0-3_amd64.deb
Checksums-Sha256:
 8fe2b7bf0b57f76fb00ad7dff694f88127a5c9336f65e89dd43e0cd958ba708b 1870 
xsel_1.2.0-3.dsc
 e673ac8268751f8e563efb1ef3090e7e76e7c91fc45738937e3abe921316cccf 3784 
xsel_1.2.0-3.debian.tar.xz
 324256a0335f061f3d81009ac25734d36e47d1d2b7cde5888b5ce6f66cb5efe6 32952 
xsel-dbgsym_1.2.0-3_amd64.deb
 667b040d5596fafe3e39617ad2b42d192aa51d327d8b6c23649089ff496c336b 6669 
xsel_1.2.0-3_amd64.buildinfo
 84987fd9c634ae5cc0dbb7d1d85852bed380433b1c43f027c37b57562a92cb95 19244 
xsel_1.2.0-3_amd64.deb
Files:
 c224033559aaadd5d4c801fefeb66c1b 1870 x11 optional xsel_1.2.0-3.dsc
 ec940aa8529417cfc70d113ba3243a27 3784 x11 optional xsel_1.2.0-3.debian.tar.xz
 0ac06b148263f662cfdb45e5148647d0 32952 debug extra 
xsel-dbgsym_1.2.0-3_amd64.deb
 b6e09e4c95446c9aee7811787c9494e5 6669 x11 optional xsel_1.2.0-3_amd64.buildinfo
 f5ec6314c1f7865415b5cea63482b3d0 19244 x11 optional xsel_1.2.0-3_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEdzOzKNJ5X1viMlrdAVCdXKtK/T8FAll0+MARHGpvc3VlQGRl
Ymlhbi5vcmcACgkQAVCdXKtK/T/jiQ//TlIvfL7nYFzCuIhwJdaCyq1edUCfQcxp
OH9Bfk29Wm7cPyhtl6L/ifNoBrqX77TujQDmiODenoxpQuhYR4hrJ2kTSS1kcwp4
lDOa3mBLwz47HzJ3N1Va5upHRKU66S70tQFzrrKZrhUtj151An0gyDPv9kE6o99Q
3u4rVGSC9Awz0xe/9iSWi4N4u/eM6/WnTfEnwfmBUUChJyvXt8jGz4WECFIX7f6x
p6M3FVKJNRwdYrP2Kkv/6RmAfkEPpV6MhTM/P3K1uIjI/YcuNmjzm6QVUVpMayQz
WJ8/Hk+GjJxmxZ8Un+6FmRaWz9hfRLVjvKzTm0mNIAoFmjIg0jvSXqqqsqwpBLzi
DtSkRi9hgcen1eOHv+oEno+oiu4jS/fZ71OSBT0xdKIaFJVPFakpSuSfg7+8mP3S
5NrVVJ+zR7l+GqWMH8vshpqjWSw/47fYbSnmt7euB/t/POofaOYe4ThwFHaNyadP
pgQVlrA4aAI91MzlXCo+AGp6nnQFzBMFxuocwk1ZH1kzHrXpjQcSEo3rsHfQ+6pk
2+zCkqP5U7q0kPxS478A5XW5grk1dtG9D6QbLzaqC0lbRI4/o8TnQ7jBDQr0HrRU
uudResmxJKlK6ubZ1ufBaADp4dVqXAlH6Rec2Aio6LXSQCCd/48X9+2O16y/lj7U
6ZhiD1h9gLk=
=XGmZ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to