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=3D132302

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 dif=
f:

$ svn diff src/contrib/smbfs/lib/smb/subr.c
Index: src/contrib/smbfs/lib/smb/subr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- src/contrib/smbfs/lib/smb/subr.c    (revisi=C3=B3n: 314251)
+++ src/contrib/smbfs/lib/smb/subr.c    (copia de trabajo)
@@ -232,6 +232,8 @@
                          islower(ch) ? ('a' + (ch - 'a' + 13) % 26) : ch);
                ch ^=3D pos;
                pos +=3D 13;
+               if (pos > 256)
+                   pos -=3D 256;
                sprintf(dst, "%02x", ch);
                dst +=3D 2;
        }
@@ -262,6 +264,8 @@
                        return EINVAL;
                ch ^=3D pos;
                pos +=3D 13;
+               if (pos > 256)
+                   pos -=3D 256;
                if (isascii(ch))
                    ch =3D (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 t=
he
same solution :-(

can someone please look into it, do a code rev and commit it; thanks

--=20
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>