From 63614b5454f83e8dee27a6b8d3d2d5ca0c3b4eb3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Apr 2016 13:07:06 -0700 Subject: [PATCH] s3: libsmb: Fix error where short name length was read as 2 bytes, should be 1. Reported by Thomas Dvorachek 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 Reviewed-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Apr 6 03:46:55 CEST 2016 on sn-devel-144 (cherry picked from commit f63b9a73b03971f41947c694e6952cd1e49b67c3) --- source3/libsmb/clilist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 94bbc573376..6438d3bce89 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -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; -- 2.11.4.GIT