1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 20:44:56 +00:00

Bugfix: segfault with wrong config

Altough the following configuration is wrong, it should only produce a error
about a missing $endif but instead it also produced a segmentation fault:

TEXT
$if_gw$gw_ip$else
This commit is contained in:
Nikolas Garofil 2009-05-13 20:25:14 +02:00
parent 4910d33524
commit 4db2119a2b

View File

@ -3260,7 +3260,8 @@ static void generate_text_internal(char *p, int p_max_size,
#endif
p[0] = 0;
for (obj = root.next; obj && p_max_size > 0; obj = obj->next) {
obj = root.next;
while (obj && p_max_size > 0) {
needed = 0; // reset for top stuff
/* IFBLOCK jumping algorithm
@ -5265,6 +5266,7 @@ static void generate_text_internal(char *p, int p_max_size,
p += a;
p_max_size -= a;
}
obj = obj->next;
}
}