[PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

Takashi Yano takashi.yano@nifty.ne.jp
Sat Oct 23 23:58:23 GMT 2021


Hi Corinna,

On Fri, 22 Oct 2021 17:11:13 +0200
Corinna Vinschen wrote:
> Just to close this up prior to the 3.3.0 release...
> 
> Given we never actually strived for 32<->64 bit interoperability, it's
> hard to argue why this should be different for the clipboard stuff.
> 
> Running 32 and 64 bit Cygwin versions in parallel doesn't actually make
> much sense for most people anyway, unless they explicitely develop for
> 32 and 64 bit systems under Cygwin.  From a productivity point of view
> there's no good reason to run more than one arch.
> 
> So I agree with Ken here.  It's probably not worth the trouble.

Current code below in fhandler_clipboard.cc causes access violation
if clipboard is accessed between 32 and 64 bit cygwin.

      cygcb_t *clipbuf = (cygcb_t *) cb_data;

      if (pos < (off_t) clipbuf->len)
        {
          ret = ((len > (clipbuf->len - pos)) ? (clipbuf->len - pos) : len);
          memcpy (ptr, clipbuf->data + pos , ret);
          pos += ret;
        }

Don't you think this should be fixed?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-patches mailing list