From a563c8fb2f3b92de6b3f7a0417f213036f7000e6 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Jul 2013 20:31:51 -0400 Subject: Fix dumb modules --- src/modules.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules.c') diff --git a/src/modules.c b/src/modules.c index f1fcb39d1..ceeb7e3a0 100644 --- a/src/modules.c +++ b/src/modules.c @@ -2563,6 +2563,14 @@ int moduleGetConfigDirective(Directive * d) char *s = NULL; char *t = NULL; int retval = 1; + int i; + + /* Dumb modules pass uninitialized string pointers here. Dumb people will not add the proper configuration values to services.conf. + * Combine the two and you end up with parse_directive never setting the char* pointers passed here. So, null them out now. + */ + for (i = 0; i < MAXPARAMS && d->params[i].type != PARAM_NONE; i++) + if (d->params[i].type == PARAM_STRING) + *(char **) d->params[i].ptr = NULL; config = fopen(SERVICES_CONF, "r"); if (!config) { -- cgit