mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 07:23:45 +01:00
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:
parent
3967a76da6
commit
52f747a9c1
@ -1321,6 +1321,9 @@ read_configuration()
|
|||||||
int i;
|
int i;
|
||||||
for(i = 0; i < n; i++)
|
for(i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
|
if(!strlen(lines[i]))
|
||||||
|
continue;
|
||||||
|
|
||||||
gchar **tokens = g_strsplit(lines[i], " ", -1);
|
gchar **tokens = g_strsplit(lines[i], " ", -1);
|
||||||
int length = g_strv_length(tokens);
|
int length = g_strv_length(tokens);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user