DEVEL15-smb-string-conversion-20080902

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)
This commit is contained in:
Jeffrey Altman 2008-09-02 22:21:34 +00:00
parent 32dbc21151
commit e422b9f856
2 changed files with 2 additions and 3 deletions

View 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));

View 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))