This is the mail archive of the
mailing list for the Cygwin project.
Re: getclip and cygutils and cygcheck
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 17 Jun 2013 12:16:33 +0200
- Subject: Re: getclip and cygutils and cygcheck
- References: <0D835E9B9CD07F40A48423F80D3B5A7021C57FB3 at USA7109MB022 dot na dot xerox dot net> <0D835E9B9CD07F40A48423F80D3B5A7021C58055 at USA7109MB022 dot na dot xerox dot net> <51B8D19B dot 7080400 at towo dot net> <20130613095556 dot GA21638 at calimero dot vinschen dot de> <CAOh4nmk2_9CV_X9HrxJ=mLJ0dJ889Yn53zrrYuciaFN7Ft1_9Q at mail dot gmail dot com> <20130614091553 dot GC4087 at calimero dot vinschen dot de> <CAOh4nmkU4ydx1FTxcL11OV3sUG9Qdb1RnLjV-x7KwOVW34Kciw at mail dot gmail dot com>
On Jun 14 23:15, Jeremy Hetzler wrote:
> On Fri, Jun 14, 2013 at 5:15 AM, Corinna Vinschen wrote:
> > What's that size? I'm not aware of any size restriction in the current
> > /dev/clipboard code. Well, there's an allocation when writing to the
> > clipboard, but it's only restricted by the size of the largest available
> > memory block in the process VM, in theory.
> After some testing, the limit seems to be 64k. It only happens when
> reading data that was copied to the clipboard by a Windows program (in
> this case Excel).
> - Open attached file in Excel
> - Ctrl-a to select all, ctrl-c to copy to clipboard
> - Then:
> 582 $ getclip >out.gc
> 583 $ cat /dev/clipboard >out.cat
> cat: /dev/clipboard: Bad address
> 584 $ wc /dev/clipboard
> wc: /dev/clipboard: Bad address
> 400 13526 65536 /dev/clipboard
> 585 $ ls -la out*
> -rw-r--r--+ 1 jhetzler Domain Users 65536 Jun 14 23:03 out.cat
> -rw-r--r--+ 1 jhetzler Domain Users 73922 Jun 14 23:03 out.gc
> This is 1.7.20 on 64-bit Windows 7 and Excel 2013.
> Does that help?
Yes, thank you. There was an ill-conceived check for the last character
in the buffer being a high surrogate UTF-16 character. It worked only
if the clipboard content was small enough to fit into a single read of
the application. If it was too big, and the application had to call
read again to fetch more from the clipboard, it tried to read the
character beyond the array boundary. I fixed that in CVS. I'll probably
create a new developer snapshot and a 64 bit test version later today.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple