From ad0d890303818e039532a064f8f52b549bfb594d Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Fri, 18 Jun 2010 10:35:12 +0200 Subject: [PATCH] Do not process empty lines This patch checks the length of a line in the zathurarc file: If the line is empty it wont be processed to prevent a segmentation fault. Thanks to escherdragon. --- zathura.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zathura.c b/zathura.c index 7f1395a..fac247e 100644 --- a/zathura.c +++ b/zathura.c @@ -1321,6 +1321,9 @@ read_configuration() int i; for(i = 0; i < n; i++) { + if(!strlen(lines[i])) + continue; + gchar **tokens = g_strsplit(lines[i], " ", -1); int length = g_strv_length(tokens);