-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
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
ngx_client模块地址拷贝错误导致踩内存 #94
Comments
ngx_pcalloc的第二个参数是size_t的吧 |
他想分配socklen长度(比如10),结果写成了sizeof(socklen)(一定是4或者8),感觉是这样,这个地方会导致出core的 |
@xbc112233 @lystormenvoy 抱歉,工作太忙没及时修复,谢谢两位指出问题 |
应该改成啥,strlen吗 |
socklen |
不太懂哈,直接传socklen的话,不是和参数类型对不上了吗? btw,群主既然都有空了。不如看看这些 |
|
issue里面有好几个我提的,dalao有空给看看吧。
…------------------ 原始邮件 ------------------
发件人: "pingostack/pingos" ***@***.***>;
发送时间: 2022年11月21日(星期一) 上午10:22
***@***.***>;
***@***.******@***.***>;
主题: Re: [pingostack/pingos] ngx_client模块地址拷贝错误导致踩内存 (Issue #94)
@xbc112233 @lystormenvoy 抱歉,工作太忙没及时修复,谢谢两位指出问题
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ngx_client_connect_server函数里面,
s->peer.sockaddr = ngx_pcalloc(s->pool, sizeof(socklen)); 这个是笔误吧?
应该是
s->peer.sockaddr = ngx_pcalloc(s->pool, socklen);
不然后面memcpy就覆盖内存了
The text was updated successfully, but these errors were encountered: