From a8ee1c2d63b79672c39a2c40c4067f05b6afb799 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 6 Oct 2018 15:44:17 +0100 Subject: explicitly check for null string before compare --- frontends/gtk/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/gtk/login.c b/frontends/gtk/login.c index 96639faea..c8ec550fd 100644 --- a/frontends/gtk/login.c +++ b/frontends/gtk/login.c @@ -139,7 +139,7 @@ get_login_description(struct nsurl *url, NSLOG(netsurf, INFO, "key:%s url:%s realm:%s str:%s", key, url_s, realm, str); - if (strcmp(key, str) != 0) { + if ((str != NULL) && (strcmp(key, str) != 0) { *out_str = str; } else { /* no message so fallback */ -- cgit v1.2.3