Merge tag 'apparmor-pr-2023-07-06' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / security / apparmor / policy_compat.c
index 7ff9184ace2942a3edd97a0b3e7f3b6ba47ef18d..0cb02da8a3193fc2f5f4cb8f30e36af51dcdbee5 100644 (file)
@@ -162,8 +162,7 @@ static struct aa_perms *compute_fperms(struct aa_dfa *dfa,
                return NULL;
        *size = state_count * 2;
 
-       /* zero init so skip the trap state (state == 0) */
-       for (state = 1; state < state_count; state++) {
+       for (state = 0; state < state_count; state++) {
                table[state * 2] = compute_fperms_user(dfa, state);
                table[state * 2 + 1] = compute_fperms_other(dfa, state);
        }