1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +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; char *eval_text;
if ((sscanf(tmpl, "template%u", &template_idx) != 1) || if ((sscanf(tmpl, "template%u", &template_idx) != 1) ||
(template_idx >= MAX_TEMPLATES)) (template_idx >= MAX_TEMPLATES) || !template[template_idx])
return NULL; return NULL;
if(args) { if(args) {