Skip to content
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

Potential buffer overflow #1752

Closed
danielwangksu opened this issue Jul 10, 2019 · 1 comment
Closed

Potential buffer overflow #1752

danielwangksu opened this issue Jul 10, 2019 · 1 comment

Comments

@danielwangksu
Copy link
Contributor

Copy the Internet host address of address->sin_addr to local variable with checking the buffer length, can cause potential buffer overflow if using a IP address with a long hostname that is obtained via a reverse DNS lookup

memcpy(address, it->ai_addr, it->ai_addrlen);
address->sin_family = it->ai_family;
address->sin_port = htons(port);
strcpy(namebuf, inet_ntoa(address->sin_addr));

@dirk-thomas
Copy link
Member

Already fixed by #1771.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants