commit e859e988694675d9a33bc3504d9104db99a7cc12
parent 43efadcf922caf6179530284043178bca05695dc
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Tue, 22 Oct 2019 16:13:15 -0700
t-runner: Fix possible assignment of NULL pointer
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
@@ -2674,7 +2674,8 @@ static void run_tests(void)
test_action_str = ptr + 4;
ptr = strchr(test_action_str, '\'');
- *ptr = '\0';
+ if (ptr)
+ *ptr = '\0';
if (!strcmp(test_action_str, "virtual"))
native_hw = false;