提交 dbc550a2 authored 作者: Michael Jerris's avatar Michael Jerris 提交者: Brian West

FS-7184: add buffer overflow check in udptl_rx_packet

上级 8ce7f24b
......@@ -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)
return -1;
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)
return -1;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论