mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
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:
parent
32dbc21151
commit
e422b9f856
@ -1996,7 +1996,7 @@ int smb_FindShare(smb_vc_t *vcp, smb_user_t *uidp,
|
|||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
clientchar_t temp[1024];
|
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),
|
cm_ClientStrPrintfN(pathName, (int)lengthof(pathName),
|
||||||
rw ? _C("/.%S/") : _C("/%S/"), temp);
|
rw ? _C("/.%S/") : _C("/%S/"), temp);
|
||||||
*pathNamep = cm_ClientStrDup(cm_ClientStrLwr(pathName));
|
*pathNamep = cm_ClientStrDup(cm_ClientStrLwr(pathName));
|
||||||
|
@ -1064,8 +1064,7 @@ smb_IoctlGetSMBName(smb_ioctl_t *ioctlp, cm_user_t *userp)
|
|||||||
int cch;
|
int cch;
|
||||||
|
|
||||||
cch = cm_ClientStringToUtf8(uidp->unp->name,
|
cch = cm_ClientStringToUtf8(uidp->unp->name,
|
||||||
cm_ClientStrLen(uidp->unp->name),
|
-1,
|
||||||
|
|
||||||
ioctlp->ioctl.outDatap,
|
ioctlp->ioctl.outDatap,
|
||||||
(SMB_IOCTL_MAXDATA -
|
(SMB_IOCTL_MAXDATA -
|
||||||
(ioctlp->ioctl.outDatap - ioctlp->ioctl.outAllocp))
|
(ioctlp->ioctl.outDatap - ioctlp->ioctl.outAllocp))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user