From: Tom Rini Date: Fri, 12 May 2017 13:21:18 -0400 Subject: [U-Boot] [U-Boot,1/1] env: avoid possible NULL pointer access In-Reply-To: <20170508182354.24180-1-xypron.glpk@gmx.de> References: <20170508182354.24180-1-xypron.glpk@gmx.de> Message-ID: <20170512172118.GX5701@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 Mon, May 08, 2017 at 08:23:54PM +0200, xypron.glpk at gmx.de wrote: > env_attr_lookup call env_attr_walk with > callback = regex_callback. > > In env_attr_walk > attributes = strchr(entry_cpy, ENV_ATTR_SEP) > will return NULL if ENV_ATTR_SEP is not found. > > In the aftermath regex_callback may call > strlen(attributes) > with a NULL value which will lead to a failure. > > The problem was indicated by scan-clam. > > 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: