mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
Fix theoretical NULL dereference in debug printf
In hostapd_logger_cb(), module_str is checked for NULL (on a path that does not get executed in practice), and then possibly dereferenced in snprintf() anyway. Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>
This commit is contained in:
parent
cbf21c7cb5
commit
1e2ffc608b
@ -92,7 +92,8 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
|
|||||||
if (hapd && hapd->conf && addr)
|
if (hapd && hapd->conf && addr)
|
||||||
os_snprintf(format, maxlen, "%s: STA " MACSTR "%s%s: %s",
|
os_snprintf(format, maxlen, "%s: STA " MACSTR "%s%s: %s",
|
||||||
hapd->conf->iface, MAC2STR(addr),
|
hapd->conf->iface, MAC2STR(addr),
|
||||||
module_str ? " " : "", module_str, txt);
|
module_str ? " " : "", module_str ? module_str : "",
|
||||||
|
txt);
|
||||||
else if (hapd && hapd->conf)
|
else if (hapd && hapd->conf)
|
||||||
os_snprintf(format, maxlen, "%s:%s%s %s",
|
os_snprintf(format, maxlen, "%s:%s%s %s",
|
||||||
hapd->conf->iface, module_str ? " " : "",
|
hapd->conf->iface, module_str ? " " : "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user