We are making a cool program to greet our clients. It expects two arguments you can type to a textbox: your name and the length of your name. Simple enough, right? And secure as can be…
Your job is to prove us wrong and trigger a crash providing malicious input that is not filtered by the program.
If you think you found it, you may test your input on this page below, at the Solution field.
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cassert>
int main(int argc, char* argv[]) {
assert(argc == 3);
char name[64];
int len;
len = atoi(argv[2]);
assert(len < 64);
memcpy(name, argv[1], len);
name[len] = ‘