libsmack: fix access type parsing
authorRafal Krypa <r.krypa@samsung.com>
Fri, 30 Nov 2012 14:03:37 +0000 (15:03 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 7 Feb 2013 11:09:48 +0000 (12:09 +0100)
Previous version of this function parsed only first ACC_LEN (5)
characters of access_type. Now the whole string will be read.

Change-Id: I9c5232959ca0939d25b9c8a5f7d31011ef681cb8

libsmack/libsmack.c

index 5f1ac3d..1cfec7d 100644 (file)
@@ -522,7 +522,7 @@ static inline void parse_access_type(const char *in, char out[ACC_LEN + 1])
                out[i] = '-';
        out[ACC_LEN] = '\0';
 
-       for (i = 0; i < ACC_LEN && in[i] != '\0'; i++)
+       for (i = 0; in[i] != '\0'; i++)
                switch (in[i]) {
                case 'r':
                case 'R':