]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-smb-string-conversion-20080902
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 2 Sep 2008 22:21:34 +0000 (22:21 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 2 Sep 2008 22:21:34 +0000 (22:21 +0000)
LICENSE MIT

more cases where -1 should be passed in as opposed to the strlen value
when converting between char and wchar forms

(cherry picked from commit 84e10d582abdf65a5354b1c4b41d7e2ecad532f8)

src/WINNT/afsd/smb.c
src/WINNT/afsd/smb_ioctl.c

index 5fab8567308d842c9d54468a720836f72d080761..3263515bbcbc81ce5f04c24df754c6a979152220 100644 (file)
@@ -1996,7 +1996,7 @@ int smb_FindShare(smb_vc_t *vcp, smb_user_t *uidp,
         if (code == 0) {
             clientchar_t temp[1024];
 
-            cm_FsStringToClientString(ftemp, (int)cm_FsStrLen(ftemp), temp, 1024);
+            cm_FsStringToClientString(ftemp, -1, temp, 1024);
             cm_ClientStrPrintfN(pathName, (int)lengthof(pathName),
                                 rw ? _C("/.%S/") : _C("/%S/"), temp);
             *pathNamep = cm_ClientStrDup(cm_ClientStrLwr(pathName));
index adc463a5250af7e479e6c04125447a1ee1c50891..d15585efc38f5478d036bda17ea381c97069f152 100644 (file)
@@ -1064,8 +1064,7 @@ smb_IoctlGetSMBName(smb_ioctl_t *ioctlp, cm_user_t *userp)
         int cch;
 
         cch = cm_ClientStringToUtf8(uidp->unp->name,
-                                    cm_ClientStrLen(uidp->unp->name),
-
+                                    -1,
                                     ioctlp->ioctl.outDatap,
                                     (SMB_IOCTL_MAXDATA -
                                      (ioctlp->ioctl.outDatap - ioctlp->ioctl.outAllocp))