From 2e3a41a53fc20a8d209f5f90072d055f91cee75f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 15 Jan 2016 18:39:03 +0200 Subject: [PATCH] hs20-osu-client: Fix check for osu_nai being available This is an array, so the pointer is never NULL; need to check that the first character is not '\0' instead. Signed-off-by: Jouni Malinen --- hs20/client/osu_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index 0315f7b75..35793c800 100644 --- a/hs20/client/osu_client.c +++ b/hs20/client/osu_client.c @@ -2229,7 +2229,7 @@ static int cmd_osu_select(struct hs20_osu_client *ctx, const char *dir, fprintf(f, "
BSSID: %s
\n" "SSID: %s
\n", last->bssid, last->osu_ssid); - if (last->osu_nai) + if (last->osu_nai[0]) fprintf(f, "NAI: %s
\n", last->osu_nai); fprintf(f, "URL: %s
\n" "methods:%s%s
\n"