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

lab6b (ASLR) | Newlines are not being removed from user input fields #40

Open
SharonBrizinov opened this issue Oct 26, 2019 · 0 comments

Comments

@SharonBrizinov
Copy link

fgets(readbuff, sizeof(readbuff), stdin);

Newlines are not being removed from any user input (both for username and password). Therefore, unless they are both 32 bytes long, they will never match the actual fields because of the '\n' difference.

I suggest adding this after both fgets calls:
readbuff[strcspn(readbuff, "\n")] = 0;

@SharonBrizinov SharonBrizinov changed the title Newlines are not being removed from user input fields lab6b (ASLR) | Newlines are not being removed from user input fields Oct 26, 2019
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