From a00f706eb67c257af9892557cfb6ad35594144cf Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 20 Aug 2008 20:44:56 +0000 Subject: [PATCH] windows-list-symlink-20080820 LICENSE MIT Another casaulty of the Unicode transition, the return value of the ListLink operation was not being convered from wchar to char before it was copied into the output buffer. --- src/WINNT/afsd/cm_ioctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 531a203e4..a161f90b3 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1959,16 +1959,20 @@ cm_IoctlListlink(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scache_t *ds code = cm_AssembleLink(scp, "", &newRootScp, &spacep, userp, reqp); cm_ReleaseSCache(scp); if (code == 0) { + char * linkstr; cp = ioctlp->outDatap; if (newRootScp != NULL) { StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), cm_mountRoot); StringCbCatA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), "/"); cp += strlen(cp); } - StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), spacep->data); + + linkstr = cm_ClientStringToFsStringAlloc(spacep->wdata, -1, NULL); + StringCbCopyA(cp, SMB_IOCTL_MAXDATA - (cp - ioctlp->outAllocp), linkstr); cp += strlen(cp) + 1; ioctlp->outDatap = cp; cm_FreeSpace(spacep); + free(linkstr); if (newRootScp != NULL) cm_ReleaseSCache(newRootScp); code = 0; -- 2.39.5