Skip to contentSkip to conversation

cifs: fix return value in cifsConvertToUTF16

DISCUSSION Anton Altaparmakov 3 participants 3 messages Sep 23, 2012 – Sep 24, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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

Quoted 38 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/;a=commit;h=c73f693989d7a7d99ec66a7065295a0c93d0b127
Commit:     c73f693989d7a7d99ec66a7065295a0c93d0b127
Parent:     4651afbbae968772efd6dc4ba461cba9b49bb9d8
Author:     Jeff Layton <[email protected]>
AuthorDate: Tue Sep 18 14:21:01 2012 -0400
Committer:  Steve French <[email protected]>
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

---
fs/cifs/cifs_unicode.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
fs/cifs/cifs_unicode.c +0 -0
index 7dab9c0..53cf2aa 100644
@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
 	}
 

ctoUTF16_out:

fs/cifs/cifs_unicode.c +1 -1
-	return i;
+	return j;

}

#ifdef CONFIG_CIFS_SMB2

Signature · 3 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
#2 lore raw

You are right - this should have gone in 3.5.

Please remind me if you see an important patch not make linux-next (or equivalently the cifs-2.6.git for-next branch). I get a big volume of email.

Quoted 56 lines · Anton Altaparmakov

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

Quoted 37 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/;a=commit;h=c73f693989d7a7d99ec66a7065295a0c93d0b127
Commit:     c73f693989d7a7d99ec66a7065295a0c93d0b127
Parent:     4651afbbae968772efd6dc4ba461cba9b49bb9d8
Author:     Jeff Layton <[email protected]>
AuthorDate: Tue Sep 18 14:21:01 2012 -0400
Committer:  Steve French <[email protected]>
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

---
fs/cifs/cifs_unicode.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
fs/cifs/cifs_unicode.c +0 -0
index 7dab9c0..53cf2aa 100644
@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
      }
 

ctoUTF16_out:

fs/cifs/cifs_unicode.c +1 -1
-     return i;
+     return j;

}

Quoted 1 line

#ifdef CONFIG_CIFS_SMB2

--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer, http://www.linux-ntfs.org/

Signature · 3 lines
Thanks,

Steve
#3 lore raw
In reply to Anton Altaparmakov
Quoted 44 lines · On Sun, 23 Sep 2012 23:18:19 +0100 Anton Altaparmakov <[email protected]> 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

Quoted 32 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/;a=commit;h=c73f693989d7a7d99ec66a7065295a0c93d0b127
Commit:     c73f693989d7a7d99ec66a7065295a0c93d0b127
Parent:     4651afbbae968772efd6dc4ba461cba9b49bb9d8
Author:     Jeff Layton <[email protected]>
AuthorDate: Tue Sep 18 14:21:01 2012 -0400
Committer:  Steve French <[email protected]>
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

---
fs/cifs/cifs_unicode.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
fs/cifs/cifs_unicode.c +0 -0
index 7dab9c0..53cf2aa 100644
@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
 	}
 
Quoted 7 lines
Quoted 6 lines

ctoUTF16_out:

fs/cifs/cifs_unicode.c +1 -1
-	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.

Signature · 1 line
Jeff Layton <[email protected]>