mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-07-01 05:11:13 +02:00
Fix NULL pointer warning
Static analysis reported an "invalid operation involving NULL pointer"
warning. Although the code properly exits the loop without ever
using the variable, test the pointer isn't NULL before incrementing
it.
Fixes: 80d3fda608
("ima-evm-utils: Check for tsspcrread in runtime")
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
@ -77,7 +77,8 @@ int get_cmd_path(const char *prog_name, char *buf, size_t buf_len)
|
||||
if (buf_len - size > ret && file_exist(buf))
|
||||
return 0;
|
||||
|
||||
start = end + 1;
|
||||
if (end != NULL)
|
||||
start = end + 1;
|
||||
|
||||
} while (end != NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user