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

ReleaseClient() incorrectly clearing memory #3

Open
cjkgit opened this issue Apr 28, 2023 · 0 comments
Open

ReleaseClient() incorrectly clearing memory #3

cjkgit opened this issue Apr 28, 2023 · 0 comments

Comments

@cjkgit
Copy link

cjkgit commented Apr 28, 2023

in static void ReleaseClient(CLIENT *pClient) in TFTPServer/main.cpp,

the line:
memset(pClient,0x00,sizeof(pClient));
should be:
memset(pClient, 0x00, sizeof(CLIENT));
so the entire structure memory gets zeroed, not just a pointer-size's worth.

This might also be an issue in other places where memset() is used.

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