APPROVE COMMIT 21.5
No comment, in it goes. I've opened an issue that this needs testing:
issue528.
Ron Isaacson writes:
For a while, I had trouble reproducing this depending on which
libraries were loaded. But you can do it pretty consistently by adding
this just above the quoted code block:
memset(data.wid.cStreamName, 1, _MAX_PATH * sizeof(wchar_t));
I do have a standalone, un-emacs-ified copy of this function too (the
exact same code as wmain) if anyone else wants to test.
> diff -r 00dca3ddee6d src/ChangeLog
> --- a/src/ChangeLog Mon May 18 23:04:48 2009 +0900
> +++ b/src/ChangeLog Tue Jun 02 12:16:27 2009 +0900
> @@ -1,3 +1,8 @@
> +2009-06-02 Ron Isaacson <Ron.Isaacson(a)morganstanley.com>
> +
> + * nt.c (mswindows_link): Fix off-by-one bug in mswindows_link:
> + need to include trailing NUL in length of file name.
> +
> 2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
>
> * XEmacs 21.5.29 "garbanzo" is released.
> diff -r 00dca3ddee6d src/nt.c
> --- a/src/nt.c Mon May 18 23:04:48 2009 +0900
> +++ b/src/nt.c Tue Jun 02 12:16:27 2009 +0900
> @@ -1127,7 +1127,8 @@
> wcscpy (data.wid.cStreamName, newuni);
> data.wid.dwStreamId = BACKUP_LINK;
> data.wid.dwStreamAttributes = 0;
> - data.wid.Size.LowPart = wlen; /* in bytes, not chars! */
> + /* Include the trailing null. In bytes, not chars! */
> + data.wid.Size.LowPart = wlen + sizeof (WCHAR);
> data.wid.Size.HighPart = 0;
> data.wid.dwStreamNameSize = 0;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches