Skip to content

Commit

Permalink
call_control: prevent buffer overflow
Browse files Browse the repository at this point in the history
Fixes Coverity CID #163990
  • Loading branch information
razvancrainea committed Mar 22, 2017
1 parent 5cca914 commit 912214b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/call_control/call_control.c
Expand Up @@ -617,11 +617,11 @@ make_custom_request(struct sip_msg *msg, CallInfo *call)
return NULL;
}
if (pt.flags & PV_VAL_INT) {
len += snprintf(request + len, sizeof(request),
len += snprintf(request + len, sizeof(request) - len - 1,
"%.*s = %d ", al->name.len, al->name.s,
pt.ri);
} else if (pt.flags & PV_VAL_STR) {
len += snprintf(request + len, sizeof(request),
len += snprintf(request + len, sizeof(request) - len - 1,
"%.*s = %.*s ", al->name.len, al->name.s,
pt.rs.len, pt.rs.s);
}
Expand Down

0 comments on commit 912214b

Please sign in to comment.