OSDN Git Service

staging: rtlwifi: check for array overflow
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Aug 2017 10:08:32 +0000 (13:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 08:16:57 +0000 (10:16 +0200)
commitdc33bd4309d2e51950904e8d8f1d333a429c3371
tree98dce418941ff296fb2797240140ed1d4fe5899c
parentcec8bb22fb311033b0f30c5a18511de38b162a40
staging: rtlwifi: check for array overflow

Smatch is distrustful of the "capab" value and marks it as user
controlled.  I think it actually comes from the firmware?  Anyway, I
looked at other drivers and they added a bounds check and it seems like
a harmless thing to have so I have added it here as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/base.c