res_pjsip_header_funcs.c: Check URI parameter length before copying.
Fixes #477
This commit is contained in:
parent
4327ec2907
commit
a2f0d99d9d
|
@ -1097,8 +1097,10 @@ static int read_param(void *obj)
|
|||
|
||||
ast_debug(2, "Successfully read %s parameter %s (length %zu)\n",
|
||||
data->paramtype == PARAMETER_URI ? "URI" : "header", data->param_name, param_len);
|
||||
ast_copy_string(data->buf, pj_strbuf(¶m->value), data->len);
|
||||
data->buf[pj_strlen(¶m->value)] = '\0';
|
||||
if (param_len) {
|
||||
ast_copy_string(data->buf, pj_strbuf(¶m->value), data->len);
|
||||
}
|
||||
data->buf[param_len] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue