2022-03-25 12:37:44

by Yupeng Li

[permalink] [raw]
Subject: [PATCH] cifs: fix FILE_BOTH_DIRECTORY_INFO definition

From: Eugene Korenevsky <[email protected]>

commit 9bbf8662a27b56358366027d1a77c0676f85b222 upstream.

The size of FILE_BOTH_DIRECTORY_INFO.ShortName must be 24 bytes, not 12
(see MS-FSCC documentation).

Signed-off-by: Eugene Korenevsky <[email protected]>
Signed-off-by: Steve French <[email protected]>
Signed-off-by: Yupeng Li <[email protected]>
---
fs/cifs/cifspdu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 1ce733f3582f..504a20250f73 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -2588,7 +2588,7 @@ typedef struct {
__le32 EaSize; /* length of the xattrs */
__u8 ShortNameLength;
__u8 Reserved;
- __u8 ShortName[12];
+ __u8 ShortName[24];
char FileName[1];
} __attribute__((packed)) FILE_BOTH_DIRECTORY_INFO; /* level 0x104 FFrsp data */

--
2.34.1