From: Simon Glass Date: Sat, 8 May 2021 16:00:07 -0600 Subject: [PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command In-Reply-To: <20210508220021.1778080-1-sjg@chromium.org> References: <20210508220021.1778080-1-sjg@chromium.org> Message-ID: <20210508220021.1778080-4-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is intended to crash. Add an annotation to keep coverity happy. Reported-by: Coverity (CID: 316347) Signed-off-by: Simon Glass --- cmd/sandbox/exception.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/sandbox/exception.c b/cmd/sandbox/exception.c index 1aa1d673aed..d865922e863 100644 --- a/cmd/sandbox/exception.c +++ b/cmd/sandbox/exception.c @@ -13,7 +13,9 @@ static int do_sigsegv(struct cmd_tbl *cmdtp, int flag, int argc, { u8 *ptr = NULL; + /* coverity[FORWARD_NULL] */ *ptr = 0; + return CMD_RET_FAILURE; } -- 2.31.1.607.g51e8a6a459-goog