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

There is a memory leak defect at line 817 in the file /masscan/src/proto-http.c. #791

Open
LuMingYinDetect opened this issue Aug 6, 2024 · 0 comments

Comments

@LuMingYinDetect
Copy link

In the file /masscan/src/proto-http.c, a pointer variable named x is defined at line 807 and a new dynamic memory area is allocated through the STRDUP function. If the if statement at line 815 returns true, the function will return at line 817, and the dynamic memory area pointed to by x is not released, resulting in a memory leak defect. It is also worth noting that even if the if statement at line 815 returns false, the function does not release the dynamic memory area pointed to by x as done at line 880, as shown in the figure below:
https://github.com/LuMingYinDetect/masscan_defects/blob/main/masscan_3.png

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

No branches or pull requests

1 participant