/* buffover.c mh75 Sp. 2019 after mwinst CSE374 example. */ #include #include void bufferplay (int a, int b, int c) { char buffer1[5]; uintptr_t ret; // holds an address //calculate the address of the return pointer ret = (uintptr_t) buffer1 + 0; // change to be address of return //treat that number like a pointer, and change the value in it *((uintptr_t*)ret) += 0; // change to add how much to advance } int main(int argc, char** argv) { int x; x = 0; printf("before: %d\n",x); bufferplay (1,2,3); x = 1; // want to skip this line printf("after: %d\n",x); return 0; }