From 5ef8d6b90327cea0b5188b1a373497f9a3ce4e3f Mon Sep 17 00:00:00 2001 From: portix Date: Tue, 17 Jul 2012 23:29:41 +0200 Subject: Check if filterlist is NULL BEFORE tilde expansion --- src/adblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/adblock.c b/src/adblock.c index b6d16527..cfa7c77d 100644 --- a/src/adblock.c +++ b/src/adblock.c @@ -824,10 +824,10 @@ adblock_init() { if (!GET_BOOL("adblocker")) return false; char *filterlist = GET_CHAR("adblocker-filterlist"); - char buffer[PATH_MAX]; - filterlist = util_expand_home(buffer, filterlist, PATH_MAX); if (filterlist == NULL) return false; + char buffer[PATH_MAX]; + filterlist = util_expand_home(buffer, filterlist, PATH_MAX); if (!g_file_test(filterlist, G_FILE_TEST_EXISTS)) { fprintf(stderr, "Filterlist not found: %s\n", filterlist); return false; -- cgit v1.2.3