From: Tom Rini Date: Sat, 6 May 2017 21:28:01 -0400 Subject: [U-Boot] [U-Boot, 1/1] lib: circbuf: avoid possible null pointer dereference In-Reply-To: <20170503212010.13944-1-xypron.glpk@gmx.de> References: <20170503212010.13944-1-xypron.glpk@gmx.de> Message-ID: <20170507012801.GY12511@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 03, 2017 at 11:20:10PM +0200, xypron.glpk at gmx.de wrote: > We should not first dereference p and afterwards assert that is > was not NULL. Instead do the assert first. > > The problem was indicated by cppcheck. > > Signed-off-by: Heinrich Schuchardt Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: