From mboxrd@z Thu Jan 1 00:00:00 1970 From: Larry Finger Subject: [PATCH 31/31] staging: r8188eu: Fix smatch error Date: Sun, 22 Dec 2013 17:37:02 -0600 Message-ID: <1387755422-11443-32-git-send-email-Larry.Finger@lwfinger.net> References: <1387755422-11443-1-git-send-email-Larry.Finger@lwfinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devel@driverdev.osuosl.org, netdev@vger.kernel.org, Larry Finger To: gregkh@linuxfoundation.org Return-path: In-Reply-To: <1387755422-11443-1-git-send-email-Larry.Finger@lwfinger.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: driverdev-devel-bounces@linuxdriverproject.org List-Id: netdev.vger.kernel.org Smatch shows the following: CHECK drivers/staging/rtl8188eu/core/rtw_mlme_ext.c drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1401 OnAssocReq() error: buffer overflow 'pstapriv->sta_aid' 32 <= 32 Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 8ebe6bc..b1de6e7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -279,7 +279,7 @@ void expire_timeout_chk(struct adapter *padapter) struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; u8 chk_alive_num = 0; - char chk_alive_list[NUM_STA]; + char chk_alive_list[NUM_STA + 1]; int i; spin_lock_bh(&pstapriv->auth_list_lock); -- 1.8.4