Browse Source

* safe -c opt processing

master
Alex 'AdUser' Z 9 years ago
parent
commit
abeeda293b
  1. 1
      src/main.c

1
src/main.c

@ -120,6 +120,7 @@ int main(int argc, char *argv[]) {
switch (opt) { switch (opt) {
case 'c': case 'c':
strncpy(opts.config_path, optarg, sizeof(opts.config_path)); strncpy(opts.config_path, optarg, sizeof(opts.config_path));
opts.config_path[sizeof(opts.config_path) - 1] = '\0';
break; break;
case 'd': case 'd':
opts.daemon = true; opts.daemon = true;

Loading…
Cancel
Save