From 608598dfef97f772d58fe1dada2fcd5392fa7b77 Mon Sep 17 00:00:00 2001 From: Rafal Krypa Date: Thu, 3 Jan 2013 10:34:34 +0100 Subject: [PATCH] libsmack: parse whole access type string, not only first 5 bytes. Previous version of this function parsed only first ACC_LEN (5) characters of access_type. Now the whole string will be read. This will prevent silent ignoring of access type characters in cases like "-rwxat" or "rrwxat". --- libsmack/libsmack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsmack/libsmack.c b/libsmack/libsmack.c index f57bbe4..1a025c2 100644 --- a/libsmack/libsmack.c +++ b/libsmack/libsmack.c @@ -611,7 +611,7 @@ static inline int access_type_to_int(const char *access_type) unsigned access; access = 0; - for (i = 0; i < ACC_LEN && access_type[i] != '\0'; i++) + for (i = 0; access_type[i] != '\0'; i++) switch (access_type[i]) { case 'r': case 'R': -- 2.7.4