[Bug 132302] [patch] smbutil(1): contrib/smbfs subr.c: saved passwords >18 char fail
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jun 7 14:51:00 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=132302
Matthias Apitz <guru at unixarea.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |guru at unixarea.de
--- Comment #1 from Matthias Apitz <guru at unixarea.de> ---
I stumbled over the same old bug, debugged it and came up with this SVN diff:
$ svn diff src/contrib/smbfs/lib/smb/subr.c
Index: src/contrib/smbfs/lib/smb/subr.c
===================================================================
--- src/contrib/smbfs/lib/smb/subr.c (revisión: 314251)
+++ src/contrib/smbfs/lib/smb/subr.c (copia de trabajo)
@@ -232,6 +232,8 @@
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 @@
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);
I wanted to file a PR, but found with search this older issue with nearly the
same solution :-(
can someone please look into it, do a code rev and commit it; thanks
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list