mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-26 21:36:00 +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
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue