Fix SMBFS when saved passwords are greater than 18 characters
PR: 132302 Submitted by: dhorn2000@gmail.com guru@unixarea.de MFC after: 1 week
This commit is contained in:
parent
69db934679
commit
f56de56355
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user