Commit d53c9f4d authored by Dan Carpenter's avatar Dan Carpenter Committed by John Johansen

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: d901d6a2 ("apparmor: dfa split verification of table headers")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent a61ecd32
......@@ -198,7 +198,7 @@ static int verify_table_headers(struct table_header **tables, int flags)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment