Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit3fe2bff627575a6dced09e0e49e775acc773c514 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-03-30 10:06:50 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-03-30 10:06:50 +0200
Files2811da4bf930de5d02d6f21cf19cdd9ac372ed89
goodwolf-3fe2bff627575a6dced09e0e49e775acc773c514.tar
goodwolf-3fe2bff627575a6dced09e0e49e775acc773c514.tar.gz
goodwolf-3fe2bff627575a6dced09e0e49e775acc773c514.zip
Parente2338bb5ed27875dbc3e01386a085df5738443eb (diff)
badwolf.c: Fixup unguarded strnlen()
1 files changed, 1 insertions, 1 deletions
-rw-r--r--badwolf.c2
diff --git a/badwolf.c b/badwolf.c
index e9f55fc..93ab325 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -193,7 +193,7 @@ webView_tab_label_change(struct Client *browser, const gchar *title)
{
GtkWidget *notebook = browser->window->notebook;
-#define title_IS_EMPTY strnlen(title, 2) == 0
+#define title_IS_EMPTY (title == NULL) || strnlen(title, 2) == 0
if(title_IS_EMPTY) title = webkit_web_view_get_title(browser->webView);
if(title_IS_EMPTY) title = webkit_web_view_get_uri(browser->webView);