commit 51640dae4f57867a9261104ee4618d43a1e3ced6 from: Stefan Sperling date: Thu Sep 14 08:31:14 2023 UTC detect ambiguous matches from genget on a ctl2 table Cannot happen right now since the table has only one entry but better be prepared for a future where we would crash otherwise. commit - 8f5b5e45a980c2f2bf7106963a74aa8558469d7b commit + 51640dae4f57867a9261104ee4618d43a1e3ced6 blob - 4ea2eea776b13eccf93bdbeeedffc97c48466cfa blob + b2f75596c7a2341b035284c80351db2dd73c1944 --- conf.c +++ conf.c @@ -426,7 +426,7 @@ void conf_ctl(FILE *output, char *delim, char *name, i if (x == NULL) { x2 = (struct daemons2 *)genget(name, (char **)ctl_daemons2, sizeof(struct daemons2)); - if (x2 == NULL) { + if (x2 == NULL || Ambiguous(x2)) { printf("%% conf_ctl: %s: genget internal failure\n", name); return; blob - 5595248f26d9a4f1057c8112534aad0e2dc3c15b blob + 4b520b7bc6d7c41c262b3c6f657a92464076d8d9 --- ctl.c +++ ctl.c @@ -650,7 +650,7 @@ ctlhandler(int argc, char **argv, char *modhvar) if (daemons == NULL) { daemons2 = (struct daemons2 *) genget(hname, (char **)ctl_daemons2, sizeof(struct daemons2)); - if (daemons2 == NULL) { + if (daemons2 == NULL || Ambiguous(daemons2)) { printf("%% Internal error - Invalid argument %s\n", argv[1]); return 0; }