[PATCH 2/8] utils: Fix possible null pointer dereference.
Ilan Peer
ilan.peer at intel.com
Thu Dec 10 02:56:03 PST 2015
From: Ayala Beker <ayala.beker at intel.com>
Fix possible null pointer dereference in wpa_debug_open_linux_tracing().
Signed-off-by: Ayala Beker <ayala.beker at intel.com>
---
src/utils/wpa_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c
index 3275524..f7acf6b 100644
--- a/src/utils/wpa_debug.c
+++ b/src/utils/wpa_debug.c
@@ -148,7 +148,7 @@ int wpa_debug_open_linux_tracing(void)
strtok_r(line, " ", &tmp2);
tmp_path = strtok_r(NULL, " ", &tmp2);
fstype = strtok_r(NULL, " ", &tmp2);
- if (strcmp(fstype, "debugfs") == 0) {
+ if (fstype && strcmp(fstype, "debugfs") == 0) {
path = tmp_path;
break;
}
--
1.9.1
More information about the Hostap
mailing list