From 8d6530ebc93a9e2657089d7cd261cd23a17c72d3 Mon Sep 17 00:00:00 2001 From: Alberto Fanjul Date: Sun, 3 Jan 2021 14:07:44 +0100 Subject: [PATCH] protect from NULL binary path --- src/wifi/wifid-supplicant.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wifi/wifid-supplicant.c b/src/wifi/wifid-supplicant.c index 644f077..fef362d 100644 --- a/src/wifi/wifid-supplicant.c +++ b/src/wifi/wifid-supplicant.c @@ -2482,7 +2482,11 @@ static int supplicant_spawn(struct supplicant *s) log_debug("spawn supplicant of %s", s->l->ifname); if (supplicant_find(&binary) < 0) { - log_error("execution of wpas (%s) not possible: %m", binary); + if (binary != NULL) { + log_error("execution of wpas (%s) not possible: %m", binary); + } else { + log_error("execution of wpas not possible: %m"); + } return -EINVAL; }