We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy_proto_insert函数中,有char ppv1buf[108], tbuf1[64], tbuf2[64];三个变量。然后下面有语句sprintf(ppv1buf, "PROXY TCP6 %s %s %d %d\r\n", tbuf1, tbuf2, ntohs(ppinfo->addr.ip6.src_port), ntohs(ppinfo->addr.ip6.dst_port));编译器会直接报出有溢出风险。由于默认有-Werror选项,会直接导致编译失败。
暂时我把ppv1buf扩大到256个字节,可以编译通过。问下这个变量为啥要定在108个字节?是不是该用snprintf或者扩大他的容量?
The text was updated successfully, but these errors were encountered:
这个地方缺失有漏洞,我们后面修复下。 ppv1buf 的长度设置为108,是因为 proxy protocol v1 的数据长度最大是107字节。
Sorry, something went wrong.
ipvs: fix issue iqiyi#947, a compiling error caused by string overflo…
efc101b
…w warning with gcc version 8.0+ Signed-off-by: ywc689 <ywc689@163.com>
ywc689
No branches or pull requests
proxy_proto_insert函数中,有char ppv1buf[108], tbuf1[64], tbuf2[64];三个变量。然后下面有语句sprintf(ppv1buf, "PROXY TCP6 %s %s %d %d\r\n", tbuf1, tbuf2, ntohs(ppinfo->addr.ip6.src_port), ntohs(ppinfo->addr.ip6.dst_port));编译器会直接报出有溢出风险。由于默认有-Werror选项,会直接导致编译失败。
暂时我把ppv1buf扩大到256个字节,可以编译通过。问下这个变量为啥要定在108个字节?是不是该用snprintf或者扩大他的容量?
The text was updated successfully, but these errors were encountered: