|
@@ -1133,8 +1133,16 @@ static int w_dlg_set_timeout(struct sip_msg *msg, char *pto, char *phe, char *ph
|
|
|
LM_ERR("no timeout value\n");
|
|
|
return -1;
|
|
|
}
|
|
|
+ if(to<=0) {
|
|
|
+ LM_ERR("invalid timeout value: %d\n", to);
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
if(phe!=NULL)
|
|
|
{
|
|
|
+ if(phi==NULL) {
|
|
|
+ LM_ERR("invalid number of parameters\n");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
if(fixup_get_ivalue(msg, (gparam_p)phe, (int*)&he)!=0)
|
|
|
{
|
|
|
LM_ERR("no hash entry value value\n");
|
|
@@ -1156,7 +1164,7 @@ static int w_dlg_set_timeout(struct sip_msg *msg, char *pto, char *phe, char *ph
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- if(update_dlg_timeout(dlg, to) != 0)
|
|
|
+ if(update_dlg_timeout(dlg, to) != 0)
|
|
|
return -1;
|
|
|
|
|
|
return 1;
|