summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <bjacquin@exosec.fr>2012-12-11 15:37:30 +0100
committerBertrand Jacquin <bjacquin@exosec.fr>2012-12-11 15:37:30 +0100
commitbdd983520e796e892f124693a3f0f58a3062aef8 (patch)
tree4cd47c3fa226111a3ad614c910df284eb99839c0
parent[BUILD] Add HTTPd CFLAGS before APR one, same for LDFLAGS (diff)
downloadmod_virtualvalue-bdd983520e796e892f124693a3f0f58a3062aef8.tar.gz
[MISC] Initialize virtualvalue_var_t handler to NULL by default so do
errors on unknown/invalid Token on safer variables
-rw-r--r--mod_virtualvalue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod_virtualvalue.c b/mod_virtualvalue.c
index 0260554..fe6d0da 100644
--- a/mod_virtualvalue.c
+++ b/mod_virtualvalue.c
@@ -68,6 +68,7 @@ static virtualvalue_var_t *vv_var_new (void) {
elm->tok = NULL;
elm->argc = 0;
elm->argv = NULL;
+ elm->handler = NULL;
elm->next = NULL;
return (elm);
@@ -300,8 +301,8 @@ static const char *vv_set (cmd_parms *cmd, void *struct_ptr __U__, int argc, cha
}
}
- if (i->tok == NULL) {
- return apr_pstrcat(cmd->pool, "Invalid Token ", n->tok, NULL);
+ if (!n->handler) {
+ return apr_pstrcat(cmd->pool, "Invalid Token ", argv[0], NULL);
}
n->argv = (char **)malloc(n->argc * sizeof(char*));