diff options
| author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-06-20 15:29:01 +0300 |
|---|---|---|
| committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-06-24 13:20:10 +0300 |
| commit | cb64d39ffdaa7bff77987d732c43da03f4d3ae7d (patch) | |
| tree | 6eec648e7e780d53778d4197b450cd2376987fe3 /runner | |
| parent | 012d9d840090892b2ac3bbc277585579a0b64079 (diff) | |
runner/resultgen: Don't pass NULL to str*() functions
If we don't get values from the JSON strlen() and strcmp() on them would
dereference NULL pointer.
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'runner')
| -rw-r--r-- | runner/resultgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runner/resultgen.c b/runner/resultgen.c index 7b4cd519..58b95220 100644 --- a/runner/resultgen.c +++ b/runner/resultgen.c @@ -866,7 +866,7 @@ static void fill_from_journal(int fd, static void override_result_single(struct json_object *obj) { - const char *errtext = NULL, *result = NULL; + const char *errtext = "", *result = ""; struct json_object *textobj; bool dmesgwarns = false; |
