windows-ioctl-prefix-data-20080726
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 27 Jul 2008 03:43:14 +0000 (03:43 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 27 Jul 2008 03:43:14 +0000 (03:43 +0000)
LICENSE MIT

The ioctl-prefix-data can be accessed either via a char_t or a wchar_t.
Copy the data buffer with memcpy() and not strcpy() because we need to
copy the entire string if it happens to be Unicode.

src/WINNT/afsd/smb_ioctl.c

index e4e5982..c67e5ee 100644 (file)
@@ -108,7 +108,7 @@ smb_SetupIoctlFid(smb_fid_t *fidp, cm_space_t *prefix)
     }
     if (prefix) {
         copyPrefix = cm_GetSpace();
-        StringCbCopy(copyPrefix->data, CM_UTILS_SPACESIZE, prefix->data);
+        memcpy(copyPrefix->data, prefix->data, CM_UTILS_SPACESIZE);
         fidp->ioctlp->prefix = copyPrefix;
     }
     lock_ReleaseMutex(&fidp->mx);
@@ -1116,7 +1116,6 @@ smb_IoctlSetACL(smb_ioctl_t *ioctlp, cm_user_t *userp)
     cm_scache_t *scp;
     afs_int32 code;
     cm_req_t req;
-    cm_ioctlQueryOptions_t *optionsp;
     afs_uint32 flags = 0;
 
     smb_InitReq(&req);