s3: libsmb: Fix error where short name length was read as 2 bytes, should be 1.
authorJeremy Allison <jra@samba.org>
Tue, 5 Apr 2016 20:07:06 +0000 (13:07 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 6 Apr 2016 01:46:55 +0000 (03:46 +0200)
Reported by Thomas Dvorachek <tdvorachek@yahoo.com> from a Windows 10 server.
Confirmed in MS-CIFS 2.2.8.1.7.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11822

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  6 03:46:55 CEST 2016 on sn-devel-144

source3/libsmb/clilist.c

index 94bbc5733766509e5bd93f9ffd97923f39980f2e..6438d3bce89ba8a23dd7efb1a950acab0b466e48 100644 (file)
@@ -186,7 +186,7 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
                        namelen = IVAL(p,0);
                        p += 4;
                        p += 4; /* EA size */
-                       slen = SVAL(p, 0);
+                       slen = CVAL(p, 0);
                        if (slen > 24) {
                                /* Bad short name length. */
                                return pdata_end - base;