Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Oct 2016 09:35:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-fs@FreeBSD.org
Subject:   [Bug 90815] [smbfs] [patch] SMBFS with character conversions sometimes hangs
Message-ID:  <bug-90815-3630-GzSIT3ld0K@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-90815-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-90815-3630@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=3D90815

Andrey V. Elsukov <ae@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ae@FreeBSD.org

--- Comment #5 from Andrey V. Elsukov <ae@FreeBSD.org> ---
(In reply to Tomoaki AOKI from comment #4)
> Without this, `cp -a` stoppes (running but in infinite loop?) on directory
> containing Japanese (UTF-8) filename if any conversion is specified (even=
 if
> it's UTF-8:UTF-8).
>=20
> Can someone confirm and commit?

If I understand the code correctly, with such patch you can get a mix of
partially converted name with the remaining unconverted part. It may lead to
unpredictable results for charsets with different character length, I guess=
.=20
Maybe it will be better to fix iconv? Or what if smb_copy_conv() will use s=
ome
reasonable error code? Can you test this patch?

--- a/sys/netsmb/smb_subr.c
+++ b/sys/netsmb/smb_subr.c
@@ -334,7 +334,7 @@ smb_copy_iconv(struct mbchain *mbp, c_caddr_t src, cadd=
r_t
dst,
                *dstlen -=3D outlen;
                return 0;
        } else
-               return error;
+               return (EINVAL);
 }

--=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-90815-3630-GzSIT3ld0K>