projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4910d33
)
Bugfix: segfault with wrong config
author
Nikolas Garofil
<garo@dunaldi.garofil.be>
Wed, 13 May 2009 18:25:14 +0000
(20:25 +0200)
committer
Nikolas Garofil
<garo@dunaldi.garofil.be>
Wed, 13 May 2009 18:25:14 +0000
(20:25 +0200)
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
src/conky.c
patch
|
blob
|
history
diff --git
a/src/conky.c
b/src/conky.c
index
78f1b25
..
f7ce451
100644
(file)
--- a/
src/conky.c
+++ b/
src/conky.c
@@
-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;
}
}