]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hs20-osu-client: Fix check for osu_nai being available
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 15 Jan 2016 16:39:03 +0000 (18:39 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 15 Jan 2016 16:39:03 +0000 (18:39 +0200)
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 <jouni@qca.qualcomm.com>
hs20/client/osu_client.c

index 0315f7b75ad43da98b8015cb93a63eb383be232a..35793c800f20e432f5849a75539582d615f3f9eb 100644 (file)
@@ -2229,7 +2229,7 @@ static int cmd_osu_select(struct hs20_osu_client *ctx, const char *dir,
                fprintf(f, "</table></a><br><small>BSSID: %s<br>\n"
                        "SSID: %s<br>\n",
                        last->bssid, last->osu_ssid);
-               if (last->osu_nai)
+               if (last->osu_nai[0])
                        fprintf(f, "NAI: %s<br>\n", last->osu_nai);
                fprintf(f, "URL: %s<br>\n"
                        "methods:%s%s<br>\n"