Skip to content

Commit

Permalink
cifs: fix return value in cifsConvertToUTF16
Browse files Browse the repository at this point in the history
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=6767

Cc: <stable@vger.kernel.org>
Reported-by: Baldvin Kovacs <baldvin.kovacs@gmail.com>
Reported-and-Tested-by: Nicolas Lefebvre <nico.lefebvre@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
jtlayton authored and smfrench committed Sep 18, 2012
1 parent 4651afb commit c73f693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/cifs_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
}

ctoUTF16_out:
return i;
return j;
}

#ifdef CONFIG_CIFS_SMB2
Expand Down

0 comments on commit c73f693

Please sign in to comment.