1
0
Fork 0

apparmor: Fix an error code in verify_table_headers()

We accidentally return a positive EPROTO instead of a negative -EPROTO.
Since 71 is not an error pointer, that means it eventually results in an
Oops in the caller.

Fixes: d901d6a298 ("apparmor: dfa split verification of table headers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
hifive-unleashed-5.1
Dan Carpenter 2018-03-19 12:12:31 +03:00 committed by John Johansen
parent a61ecd329c
commit d53c9f4d21
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ out:
static int verify_dfa(struct aa_dfa *dfa)
{
size_t i, state_count, trans_count;
int error = EPROTO;
int error = -EPROTO;
state_count = dfa->tables[YYTD_ID_BASE]->td_lolen;
trans_count = dfa->tables[YYTD_ID_NXT]->td_lolen;