So here I believe I have a small buffer overflow problem I found when reviewing someone else\'s code. It immediately struck me as incorrect, and potentially dangerous, but a
The problem is that you are writing somewhere in the memory, but not on the stack. Therefore, it's hard to actually see what's wrong. If you want to see the damages, try allocating the string on the stack
char buffer[strlen("This string is 27 char long" + 1)];
and the write past it. Other variables will be written, you can also add some code to be executed if you really know how the binary works.
To exploit a buffer overflow like that, you need to write the data you want, then find a way to "jump" to this data to be executed.