diff options
author | cbdev <cb@cbcdn.com> | 2017-07-03 23:55:30 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2017-07-03 23:55:30 +0200 |
commit | 7cc78e0413504ba0c58289d964a65df2b872271e (patch) | |
tree | 645405c09b4a219111dfe824c638a7c59b9ee2c8 | |
parent | 1ffe53ba1493741b209c3040a359799c5ada4cf4 (diff) | |
download | midimonster-7cc78e0413504ba0c58289d964a65df2b872271e.tar.gz midimonster-7cc78e0413504ba0c58289d964a65df2b872271e.tar.bz2 midimonster-7cc78e0413504ba0c58289d964a65df2b872271e.zip |
Validate instance names
-rw-r--r-- | config.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |