Skip to content
Commit 00e0590d authored by Colin Ian King's avatar Colin Ian King Committed by John Johansen
Browse files

apparmor: fix unsigned len comparison with less than zero



The sanity check in macro update_for_len checks to see if len
is less than zero, however, len is a size_t so it can never be
less than zero, so this sanity check is a no-op.  Fix this by
making len a ssize_t so the comparison will work and add ulen
that is a size_t copy of len so that the min() macro won't
throw warnings about comparing different types.

Addresses-Coverity: ("Macro compares unsigned to 0")
Fixes: f1bd9041 ("apparmor: add the base fns() for domain labels")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 136db994
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment