From 89fd72cd374853c34a75244a4150e5f052c5c51e 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 --- 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 94bbc57..6438d3b 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.8.0.rc3.226.g39d4020