aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorAyala Beker <ayala.beker@intel.com>2015-12-10 10:56:03 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-17 22:24:52 (GMT)
commit819ad5b70b0cb2d3ed64c11aa4cbf11c9a3fc698 (patch)
tree30ffc14d7fcf18a16ea86c87005f9d0660f58584 /src/utils
parent1b3dd69d93a082a33fb442997e2fa5ab492010ac (diff)
downloadhostap-819ad5b70b0cb2d3ed64c11aa4cbf11c9a3fc698.zip
hostap-819ad5b70b0cb2d3ed64c11aa4cbf11c9a3fc698.tar.gz
hostap-819ad5b70b0cb2d3ed64c11aa4cbf11c9a3fc698.tar.bz2
utils: Fix NULL pointer dereference with unexpected kernel behavior
Fix mostly theoretical NULL pointer dereference in wpa_debug_open_linux_tracing() if /proc/mounts were to return a malformed line. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/wpa_debug.c2
1 files changed, 1 insertions, 1 deletions
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;
}