From 5fd2c91f512b7311f11c76023da45758fb8c4365 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Mon, 27 Jun 2016 13:04:50 +0200 Subject: [PATCH] userblacklist: removed errorneous extra checks in fixup parameters function - parsing the parameters should be enough for validity - no need to attempt to parse to integer first parameter, it's not expected and results in a crash for static string parameters - reported by Jan Hazenberg --- modules/userblacklist/userblacklist.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/modules/userblacklist/userblacklist.c b/modules/userblacklist/userblacklist.c index 17aebc2fae7..421f71fd7d8 100644 --- a/modules/userblacklist/userblacklist.c +++ b/modules/userblacklist/userblacklist.c @@ -208,22 +208,6 @@ static int check_user_blacklist_fixup(void** param, int param_no) return E_UNSPEC; } - if(model->spec==NULL || model->spec->getf==NULL) { - if(param_no == 1) { - if(str2int(&s, (unsigned int*)&model->spec->pvp.pvn.u.isname.name.n) != 0) { - LM_ERR("wrong value [%.*s] for parameter %d\n", s.len, s.s, param_no); - return E_UNSPEC; - } - } else { - if(param_no == 2 || param_no == 3) { - LM_ERR("wrong value [%.*s] for parameter %d\n", s.len, s.s, param_no); - return E_UNSPEC; - } else { - // only a string - return 0; - } - } - } *param = (void*)model; } else { LM_ERR("wrong number of parameters\n");