logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 3fe2bff627575a6dced09e0e49e775acc773c514
parent: e2338bb5ed27875dbc3e01386a085df5738443eb
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 30 Mar 2020 10:06:50 +0200

badwolf.c: Fixup unguarded strnlen()

Diffstat:

Mbadwolf.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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);