Skip to content
Snippets Groups Projects
Commit 1499640d authored by Sean Bright's avatar Sean Bright
Browse files

chan_sip: Ensure 'qualifygap' isn't negative

Passing negative intervals to the scheduler rips a hole in the
space-time continuum.

ASTERISK-25792 #close
Reported by: Paul Sandys

Change-Id: Ie706f21cee05f76ffb6f7d89e9c867930ee7bcd7
parent 4c2a0091
No related branches found
No related tags found
No related merge requests found
......@@ -33182,7 +33182,8 @@ static int reload_config(enum channelreloadreason reason)
ast_log(LOG_WARNING, "Usage of SIP_CAUSE is deprecated. Please use HANGUPCAUSE instead.\n");
}
} else if (!strcasecmp(v->name, "qualifygap")) {
if (sscanf(v->value, "%30d", &global_qualify_gap) != 1) {
if (sscanf(v->value, "%30d", &global_qualify_gap) != 1
|| global_qualify_gap < 0) {
ast_log(LOG_WARNING, "Invalid qualifygap '%s' at line %d of %s\n", v->value, v->lineno, config);
global_qualify_gap = DEFAULT_QUALIFY_GAP;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment