From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 10 Jan 2020 16:51:00 -0500 Subject: [PATCH] test/cmd_ut.c: fix cmd_ut_category In-Reply-To: <1578587642-2109-1-git-send-email-philippe.reynes@softathome.com> References: <1578587642-2109-1-git-send-email-philippe.reynes@softathome.com> Message-ID: <20200110215100.GS31026@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 Thu, Jan 09, 2020 at 05:34:02PM +0100, Philippe Reynes wrote: > In the function cmd_ut_category, the prefix is used with > the function strncmp to know if the prefix should be > removed from the test name, even if the prefix is NULL. > > To avoid this issue, we consider that a prefix NULL > mean no prefix. So we only try to remove the prefix > from the test_name if the prefix is not NULL, then > we avoid to call the function strncmp with a NULL > prefix. > > Reported-by: Coverity CID 281110 > Fixes: 4ad4edfe ("cmd_ut: add a parameter prefix to the function cmd_ut_category") > Signed-off-by: Philippe Reynes Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: