From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 31/31] staging: r8188eu: Fix smatch error Date: Thu, 2 Jan 2014 11:44:10 +0300 Message-ID: <20140102084410.GY28413@mwanda> References: <1387755422-11443-1-git-send-email-Larry.Finger@lwfinger.net> <1387755422-11443-32-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, gregkh@linuxfoundation.org, netdev@vger.kernel.org To: Larry Finger Return-path: Content-Disposition: inline In-Reply-To: <1387755422-11443-32-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 On Sun, Dec 22, 2013 at 05:37:02PM -0600, Larry Finger wrote: > 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 > This is a false positive in Smatch. Don't do work arounds for buggy tools. If you have the cross function database built on the latest version of Smatch then I think it understands the code correctly and doesn't print a warning. regards, dan carpenter