]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - hostapd/main.c
Fix theoretical NULL dereference in debug printf
[thirdparty/hostap.git] / hostapd / main.c
index db2a455824555b078eb49434fb1f1603b81c05a7..30269293c5a3984bbe9432d34815b5c6086a7d3d 100644 (file)
@@ -92,7 +92,8 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
        if (hapd && hapd->conf && addr)
                os_snprintf(format, maxlen, "%s: STA " MACSTR "%s%s: %s",
                            hapd->conf->iface, MAC2STR(addr),
-                           module_str ? " " : "", module_str, txt);
+                           module_str ? " " : "", module_str ? module_str : "",
+                           txt);
        else if (hapd && hapd->conf)
                os_snprintf(format, maxlen, "%s:%s%s %s",
                            hapd->conf->iface, module_str ? " " : "",