[ANNOUNCEMENT] Updated: cygutils 1.4.16-8 (Test)

Mark Geisert mark@maxrnd.com
Sun Nov 21 10:36:25 GMT 2021

Hi Denis,

Denis Excoffier wrote:
> Hello,
>> On 2021-11-03 10:59, Mark Geisert wrote:
>> The following packages have been uploaded to the Cygwin distribution:
>> * cygutils-1.4.16-8
>> * cygutils-extra-1.4.16-8
>> * cygutils-x11-1.4.16-8
> The '-u' or '-d' option of getclip does not seem to work properly under xterm.
> How to reproduce:
> 1) Open an xterm
> 2) Select a simple piece of text (with no line ending)
> 3) getclip -u
> 4) Observe 'Segmentation fault(core dumped)'
> If step 2 is replaced by ‘printf AAAA | putclip', no error.
> If step 3 is replaced by ‘getclip’, no error.
> I can’t tell whether this is new or not.

It appears to be old.  An xterm selection is placed on the Windows clipboard in 
CF_UNICODETEXT format.  'getclip' can deal with this, 'getclip -u' and 'getclip 
-d' cannot; they always request CF_TEXT (i.e., ANSI) format and assume they get a 
buffer of data.  But the formats don't match and there's no data supplied.  That's 
why the segfault occurs.

I've committed a patch to the cygutils git repository that fixes the segfault:

The fix will be part of an upcoming build of cygutils, 1.4.16-9, hopefully in the 
next few days.  Beyond that, the limitation in formats with "-u" and "-d" will be 
relaxed later on.


More information about the Cygwin mailing list