apparmor: store return value of unpack_perms_table() to signed variable
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Tue, 4 Oct 2022 08:45:15 +0000 (13:45 +0500)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 4 Oct 2022 09:34:29 +0000 (02:34 -0700)
commit5515a8e30eaa8ae0d57ec59c908716cf2af114ae
tree3c05f5a57eeb4a328dc41362f90bb4e93c427276
parent32490541682bf8ea445e9bd29c866981851e0912
apparmor: store return value of unpack_perms_table() to signed variable

The unpack_perms_table() can return error which is negative value. Store
the return value to a signed variable. policy->size is unsigned
variable. It shouldn't be used to store the return status.

Fixes: 2d6b2dea7f3c ("apparmor: add the ability for policy to specify a permission table")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy_unpack.c