Skip to content
Commit 990a9d49 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net/ncsi: prevent a couple array underflows

We recently refactored this code and introduced a static checker
warning.  Smatch complains that if cmd->index is zero then we would
underflow the arrays.  That's obviously true.

The question is whether we prevent cmd->index from being zero at a
different level.  I've looked at the code and I don't immediately see
a check for that.

Fixes: 062b3e1b

 ("net/ncsi: Refactor MAC, VLAN filters")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be7f3e59
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