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.
This commit is contained in:
Moritz Lipp 2010-06-18 10:35:12 +02:00
parent 3967a76da6
commit 52f747a9c1

View file

@ -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);