diff options
author | Tomas Popela <tpopela@redhat.com> | 2018-07-24 12:45:42 +0200 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2019-01-21 14:38:59 +0000 |
commit | 538e86cc7c1c529f838a3aa5c1f603b37a5ad8cb (patch) | |
tree | de10b9a15de2fa93e576eb41847d979270652665 /libyelp | |
parent | 9847b4320718f5a2f0f61b4142268d6f3e273f6f (diff) | |
download | yelp-538e86cc7c1c529f838a3aa5c1f603b37a5ad8cb.tar.gz |
Check variable before dereferencing it
yelp-3.28.1/libyelp/yelp-mallard-document.c:341: var_compare_op: Comparing "path" to null implies that "path" might be null.
yelp-3.28.1/libyelp/yelp-mallard-document.c:346: var_deref_op: Dereferencing null pointer "path".
Diffstat (limited to 'libyelp')
-rw-r--r-- | libyelp/yelp-mallard-document.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c index 1302a116..b1565580 100644 --- a/libyelp/yelp-mallard-document.c +++ b/libyelp/yelp-mallard-document.c @@ -346,7 +346,7 @@ mallard_think (YelpMallardDocument *mallard) */ error = g_error_new (YELP_ERROR, YELP_ERROR_NOT_FOUND, _("The directory ā%sā does not exist."), - path[0]); + path && path[0] ? path[0] : "NULL"); yelp_document_error_pending ((YelpDocument *) mallard, error); g_error_free (error); goto done; |