From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754698Ab2IXAFf (ORCPT ); Sun, 23 Sep 2012 20:05:35 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:43354 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754645Ab2IXAFe (ORCPT ); Sun, 23 Sep 2012 20:05:34 -0400 Date: Sun, 23 Sep 2012 20:05:27 -0400 From: Jeff Layton To: Anton Altaparmakov Cc: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, "linux-kernel@vger.kernel.org" , Unix Support Subject: Re: cifs: fix return value in cifsConvertToUTF16 Message-ID: <20120923200527.2540668f@corrin.poochiereds.net> In-Reply-To: <96965BD0-8BA7-41C0-A459-7F4DC871F607@cam.ac.uk> References: <20120922202809.250DB3402DF@ra.kernel.org> <96965BD0-8BA7-41C0-A459-7F4DC871F607@cam.ac.uk> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.11; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 23 Sep 2012 23:18:19 +0100 Anton Altaparmakov wrote: > Hi Steve, > > Hey, I sent you that exact same patch on the 12th June! Would have saved you and others some valuable time if you hadn't ignored it then! (-; > > Told you it was an obvious logic bug! (-; > > Best regards, > > Anton > > On 22 Sep 2012, at 21:28, Linux Kernel Mailing List wrote: > > > Gitweb: http://git.kernel.org/linus/;a=commit;h=c73f693989d7a7d99ec66a7065295a0c93d0b127 > > Commit: c73f693989d7a7d99ec66a7065295a0c93d0b127 > > Parent: 4651afbbae968772efd6dc4ba461cba9b49bb9d8 > > Author: Jeff Layton > > AuthorDate: Tue Sep 18 14:21:01 2012 -0400 > > Committer: Steve French > > CommitDate: Tue Sep 18 15:35:25 2012 -0500 > > > > cifs: fix return value in cifsConvertToUTF16 > > > > 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: > > Reported-by: Baldvin Kovacs > > Reported-and-Tested-by: Nicolas Lefebvre > > Signed-off-by: Jeff Layton > > Signed-off-by: Steve French > > --- > > fs/cifs/cifs_unicode.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c > > index 7dab9c0..53cf2aa 100644 > > --- a/fs/cifs/cifs_unicode.c > > +++ b/fs/cifs/cifs_unicode.c > > @@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen, > > } > > > > ctoUTF16_out: > > - return i; > > + return j; > > } > > > > #ifdef CONFIG_CIFS_SMB2 > My apologies, Anton. I would have just asked Steve to include that patch instead of reposting it, but I didn't recall seeing you post it to the list. -- Jeff Layton