Re: [PATCH] net/ncsi: prevent a couple array underflows

2018-05-17 Thread David Miller
From: Dan Carpenter Date: Thu, 17 May 2018 15:33:36 +0300 > 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

[PATCH] net/ncsi: prevent a couple array underflows

2018-05-17 Thread Dan Carpenter
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