I am solving a binary exploitation challenge on picoCTF and came across this piece of code:
((void (*)())buf)();
where buf
is a character array.
I solved the challenge but can't seem to understand what exactly it's doing. I looked at this thread but I couldn't make it out.
What does ((void (*)())buf)();
mean?
((void (*)())buf)();
mean? It means the author doesn't understandtypedef
.typedef void (*voidFuncPtrType)();
would make this code clear.