summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2012-12-04 12:53:04 +0100
committerBertrand Jacquin <beber@meleeweb.net>2012-12-04 12:53:04 +0100
commitfd7a0af46ca04161e42f1a65ebc22ac5d56fda75 (patch)
tree44783361d6a0a79cfac63534ef188049eedc2476
parent[CLEANUP] Avoid null derefence (diff)
downloadmod_virtualvalue-fd7a0af46ca04161e42f1a65ebc22ac5d56fda75.tar.gz
[CLEANUP] Avoid bug if no argument is given to VirtualValue
-rw-r--r--mod_virtualvalue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mod_virtualvalue.c b/mod_virtualvalue.c
index c2c607c..21aeae9 100644
--- a/mod_virtualvalue.c
+++ b/mod_virtualvalue.c
@@ -461,6 +461,9 @@ static const char *vv_set (cmd_parms *cmd, void *struct_ptr __U__, int argc, cha
return NULL;
}
+ if (!argc || !argv[0])
+ return NULL;
+
n = vv_var_new ();
if (!n)