three lines of code ...
I am reading the "Buffer Overflow Attacks" and i cannot understand
three simple (i think) lines of code: (code = malloc(flen)) 50 void (*fptr)(void); ... 64 fptr = (void (*)(void)) code; 65 (*fptr)(); in 50 i presume tht fptr is a pointer to a function that has one void argument and returns a void... is this true? and what about line 64 and 65 ... they puzzled me... any help ? Thank you very much! |
Line 64 is setting fptr to code with a cast so code is being cast to a pointer to a function taking and returning a void.
Line 65 is calling the function pointed to by fptr. |
All times are GMT -5. The time now is 03:48 AM. |