mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
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>
This commit is contained in:
parent
1b3dd69d93
commit
819ad5b70b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user