changeset 4638:5bbff3553494

mswindows_link had off-by-one error. <1vq2brxz.wl_Ron.Isaacson@morganstanley.com>
author Stephen J. Turnbull <stephen@xemacs.org>
date Fri, 05 Jun 2009 21:48:41 +0900
parents 00dca3ddee6d
children 7757334005ae
files src/ChangeLog src/nt.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon May 18 23:04:48 2009 +0900
+++ b/src/ChangeLog	Fri Jun 05 21:48:41 2009 +0900
@@ -1,3 +1,8 @@
+2009-06-02  Ron Isaacson  <Ron.Isaacson@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@xemacs.org>
 
 	* XEmacs 21.5.29 "garbanzo" is released.
--- a/src/nt.c	Mon May 18 23:04:48 2009 +0900
+++ b/src/nt.c	Fri Jun 05 21:48:41 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;