[PATCH 14/17] getcifsacl: clarify magic number if print_ace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx>
---
 getcifsacl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/getcifsacl.c b/getcifsacl.c
index da4bb67..083705c 100644
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -208,11 +208,11 @@ print_sid_raw:
 static void
 print_ace(struct cifs_ace *pace, char *end_of_acl, int raw)
 {
-	/* validate that we do not go past end of acl */
-
+	/* 16 == size of cifs_ace sans the cifs_sid */
 	if (le16toh(pace->size) < 16)
 		return;
 
+	/* validate that we do not go past end of acl */
 	if (end_of_acl < (char *)pace + le16toh(pace->size))
 		return;
 
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux