From 4fa0f097399c7d396bc14a6692476ada6981c458 Mon Sep 17 00:00:00 2001 From: Jiafei Pan Date: Fri, 2 Sep 2022 11:59:52 +0800 Subject: [PATCH] fix(nxp-tools): fix coverity issue Check the value is not NULL. Signed-off-by: Jiafei Pan Change-Id: If753e9875153a8e31498addf89202c953abf64ef --- tools/nxp/create_pbl/create_pbl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/nxp/create_pbl/create_pbl.c b/tools/nxp/create_pbl/create_pbl.c index 9457a00b1..792747f0e 100644 --- a/tools/nxp/create_pbl/create_pbl.c +++ b/tools/nxp/create_pbl/create_pbl.c @@ -823,7 +823,9 @@ int main(int argc, char **argv) } } - if ((args & MAND_ARG_MASK) != MAND_ARG_MASK) { + if ((args & MAND_ARG_MASK) != MAND_ARG_MASK + || pblimg.rcw_nm == NULL + || pblimg.imagefile == NULL) { print_usage(); } -- 2.39.5