MBE icon indicating copy to clipboard operation
MBE copied to clipboard

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

Open SharonBrizinov opened this issue 5 years ago • 0 comments

https://github.com/RPISEC/MBE/blob/2b0b6773eb36e6375186126b0fe489ce6503d2b6/src/lab06/lab6B.c#L120

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 avatar Oct 26 '19 10:10 SharonBrizinov