summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index f44937c..4fdbdcb 100644
--- a/config.c
+++ b/config.c
@@ -57,13 +57,13 @@ int cfg_init() {
if(!config_setting_lookup_string(channel_setting, "name", &name)) {
char *sname;
sname = malloc(sizeof(char) * 16);
- sprintf(sname, "channel #%d", i+1);
+ snprintf(sname, 16, "channel #%d", i+1);
name = sname;
}
if(!config_setting_lookup_string(channel_setting, "xmlpath", &xmlpath)) {
/* Index-based filename if xmlpath isn't set. */
char temp[0xf];
- sprintf(temp, "%d.xml", i);
+ snprintf(temp, 0xf, "%d.xml", i);
xmlpath = strdup(temp);
}
struct channel_t *channel;