mgcp_parse_audio_port_pt(): fix buffer overflow
Change-Id: I18c78d15eb1593f404b4741248225b68878b463f
This commit is contained in:
parent
5e5c7bc176
commit
8b663e4d7c
|
@ -319,7 +319,7 @@ static int mgcp_parse_audio_port_pt(struct mgcp_response *r, char *line)
|
||||||
pt_str = strtok(line, " ");
|
pt_str = strtok(line, " ");
|
||||||
while (1) {
|
while (1) {
|
||||||
/* Do not allow excessive payload types */
|
/* Do not allow excessive payload types */
|
||||||
if (count > ARRAY_SIZE(r->codecs))
|
if (count >= ARRAY_SIZE(r->codecs))
|
||||||
goto response_parse_failure_pt;
|
goto response_parse_failure_pt;
|
||||||
|
|
||||||
pt_str = strtok(NULL, " ");
|
pt_str = strtok(NULL, " ");
|
||||||
|
|
Loading…
Reference in New Issue