summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-06-27 14:09:04 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 13:59:51 +0100
commit04db2eb6686a0de1ff934656791d4225d201a6d2 (patch)
treef556ac6b7c369ac6f99b00019bcb80828e987f17 /scripts
parentd5342c26646107b126ab2f1e0aa410006559c561 (diff)
apparmor: fix unsigned len comparison with less than zero
[ Upstream commit 00e0590dbaec6f1bcaa36a85467d7e3497ced522 ] 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: f1bd904175e8 ("apparmor: add the base fns() for domain labels") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions