svn commit: r319980 - stable/11/contrib/smbfs/lib/smb
Josh Paetzel
jpaetzel at FreeBSD.org
Thu Jun 15 16:12:46 UTC 2017
Author: jpaetzel
Date: Thu Jun 15 16:12:45 2017
New Revision: 319980
URL: https://svnweb.freebsd.org/changeset/base/319980
Log:
MFC 319670
Fix SMBFS when saved passwords are greater than 18 character
PR: 132302
Submitted by: dhorn2000 at gmail.com guru at unixarea.de
Approved by: re (gjb)
Modified:
stable/11/contrib/smbfs/lib/smb/subr.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/smbfs/lib/smb/subr.c
==============================================================================
--- stable/11/contrib/smbfs/lib/smb/subr.c Thu Jun 15 15:50:49 2017 (r319979)
+++ stable/11/contrib/smbfs/lib/smb/subr.c Thu Jun 15 16:12:45 2017 (r319980)
@@ -232,6 +232,8 @@ smb_simplecrypt(char *dst, const char *src)
islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
ch ^= pos;
pos += 13;
+ if (pos > 256)
+ pos -= 256;
sprintf(dst, "%02x", ch);
dst += 2;
}
@@ -262,6 +264,8 @@ smb_simpledecrypt(char *dst, const char *src)
return EINVAL;
ch ^= pos;
pos += 13;
+ if (pos > 256)
+ pos -= 256;
if (isascii(ch))
ch = (isupper(ch) ? ('A' + (ch - 'A' + 13) % 26) :
islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
More information about the svn-src-stable
mailing list