diff --git a/src/ssb.tests.c b/src/ssb.tests.c index 2b167c41..5b942fc8 100644 --- a/src/ssb.tests.c +++ b/src/ssb.tests.c @@ -1582,7 +1582,7 @@ void tf_ssb_test_cli(const tf_test_options_t* options) snprintf(command, sizeof(command), "%s get_sequence -i %s -d out/test_db0.sqlite", options->exe_path, id); char* sequence = _trim(_subprocess_check_output(command)); - if (strcmp(sequence, "2") != 0) + if (!sequence || strcmp(sequence, "2") != 0) { tf_printf("sequence = %s (expected 1)\n", sequence); abort(); @@ -1592,7 +1592,7 @@ void tf_ssb_test_cli(const tf_test_options_t* options) snprintf(command, sizeof(command), "%s get_profile -i %s -d out/test_db0.sqlite", options->exe_path, id); char* profile = _trim(_subprocess_check_output(command)); const char* k_expected_profile = "{\"name\":\"test_user\"}"; - if (strcmp(profile, k_expected_profile) != 0) + if (!profile || strcmp(profile, k_expected_profile) != 0) { tf_printf("profile = %s (expected \"%s\")\n", profile, k_expected_profile); abort();