New answers tagged c
It's dangerous. Is it exploitable? Possibly. You've already told us that you can cause a crash, so you may be able to DoS a system by crashing it... depending upon where argv1 comes from. If it's a hard coded value, or if it's generated by a calling app and can only ever be between 0 and 20, then it may not be exploitable in the system. It would still be a ...
Yes You don't need to use -1, any value larger than 20 will allow you to overflow the buffer. It will depend on the next instructions and the mitigations set by the compiler, but from this point on you can probably overwrite the return address and execute a shell code provided as the second parameter.
Top 50 recent answers are included