aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.c b/config.c
index d3605e2..c41a614 100644
--- a/config.c
+++ b/config.c
@@ -132,6 +132,12 @@ int config_read(char* cfg_file){
goto bail;
}
+ //validate instance name
+ if(strchr(separator, ' ') || strchr(separator, '.')){
+ fprintf(stderr, "Invalid instance name %s\n", separator);
+ goto bail;
+ }
+
current_instance = current_backend->create();
if(!current_instance){
fprintf(stderr, "Failed to instantiate backend %s\n", line);