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:
parent
eada1d62c7
commit
27647cad81
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user