summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>2023-03-06 22:18:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-06 13:10:42 +0300
commit60b2027077ea664016cf43f77d77e843eff582c9 (patch)
treeaa94e911dd3416d7d4721ba623ed00ea888493c3 /arch/mips
parent8b46440d1a6350fba0cda1be163e36235226e1d0 (diff)
downloadlinux-60b2027077ea664016cf43f77d77e843eff582c9.tar.xz
ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
[ Upstream commit 748b2f5e82d17480404b3e2895388fc2925f7caf ] mac_len is of type unsigned, which can never be less than zero. mac_len = ieee802154_hdr_peek_addrs(skb, &header); if (mac_len < 0) return mac_len; Change this to type int as ieee802154_hdr_peek_addrs() can return negative integers, this is found by static analysis with smatch. Fixes: 6c993779ea1d ("ca8210: fix mac_len negative array access") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Acked-by: Alexander Aring <aahringo@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230306191824.4115839-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips')
0 files changed, 0 insertions, 0 deletions