mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-22 20:04:52 +00:00
FS-7184: add buffer overflow check in udptl_rx_packet
This commit is contained in:
parent
8ce7f24b41
commit
dbc550a26d
@ -223,6 +223,9 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
|
|||||||
if ((stat = decode_length(buf, len, &ptr, &count)) < 0)
|
if ((stat = decode_length(buf, len, &ptr, &count)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
if (total_count + i >= 16) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i]) != 0)
|
if (decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i]) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user