Commit f2efd134 authored by Jeff Layton's avatar Jeff Layton Committed by Ben Hutchings

cifs: fix return value in cifsConvertToUTF16

commit c73f6939 upstream.

This function returns the wrong value, which causes the callers to get
the length of the resulting pathname wrong when it contains non-ASCII
characters.

This seems to fix https://bugzilla.samba.org/show_bug.cgi?id=6767Reported-by: default avatarBaldvin Kovacs <baldvin.kovacs@gmail.com>
Reported-and-Tested-by: default avatarNicolas Lefebvre <nico.lefebvre@gmail.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 69102700
......@@ -327,6 +327,6 @@ cifsConvertToUCS(__le16 *target, const char *source, int srclen,
}
ctoUCS_out:
return i;
return j;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment