1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

Don't crash when expanding undefined template (sf.net #3306537)

bug reported by denisfr
This commit is contained in:
Pavel Labath 2011-10-09 15:02:52 +02:00
parent eada1d62c7
commit 27647cad81

View File

@ -146,7 +146,7 @@ static char *handle_template(const char *tmpl, const char *args)
char *eval_text;
if ((sscanf(tmpl, "template%u", &template_idx) != 1) ||
(template_idx >= MAX_TEMPLATES))
(template_idx >= MAX_TEMPLATES) || !template[template_idx])
return NULL;
if(args) {