Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jun 2017 14:51:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 132302] [patch] smbutil(1): contrib/smbfs subr.c: saved passwords >18 char fail
Message-ID:  <bug-132302-8-xQZsWV1jq9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-132302-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-132302-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=132302

Matthias Apitz <guru@unixarea.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |guru@unixarea.de

--- Comment #1 from Matthias Apitz <guru@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-132302-8-xQZsWV1jq9>