mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
When encoding an smb name, truncate one byte earlier in order than we did
previously in order to ensure it fit properly in the bufer when encoded. This prevents a debugging printf from firing if a source or destination host name for an smb mount exceeds 15 characters. MFC after: 3 days Obtained from: Apple, Inc.
This commit is contained in:
parent
e0dec6ebb1
commit
6966d7767a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184567
|
@ -169,7 +169,7 @@ nb_name_encode(struct nb_name *np, u_char *dst)
|
|||
memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' '));
|
||||
cp += NB_ENCNAMELEN;
|
||||
} else {
|
||||
for (i = 0; *name && i < NB_NAMELEN; i++, cp += 2, name++)
|
||||
for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++)
|
||||
*(u_short*)cp = NBENCODE(toupper(*name));
|
||||
i = NB_NAMELEN - i - 1;
|
||||
if (i > 0) {
|
||||
|
|
Loading…
Reference in a new issue