Skip to content

bugfix: type size_t overflow under 32-bit operating system #1756

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

Merged
merged 2 commits into from
Aug 11, 2020

Conversation

syzh
Copy link
Contributor

@syzh syzh commented Jul 25, 2020

variable size overflow when reading data larger than 4GB under 32-bit operating system

see: https://forum.openresty.us/d/6408-324g

@@ -2396,7 +2396,7 @@ ngx_http_lua_socket_tcp_read(ngx_http_request_t *r,
ngx_connection_t *c;
ngx_buf_t *b;
ngx_event_t *rev;
size_t size;
off_t size;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need one more space and align here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link

@bodysen bodysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@doujiang24 doujiang24 merged commit 3e24a95 into openresty:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants