Pwnable.kr Mistake
For this one, you need to be especially careful, while inspecting the source code, pay attention to the line:
|
|
Here, the programmer meant to to save the return value of open()
to fd,
but they forgot to use braces so instead they save the result of the comparison
to fd. So, if the comparison fails, fd is set to 0. That is STDIN. Hence, all we
need to do is input a 10 character string first and after that the string with
each byte XORed with 1.
|
|