I wanna modify the following function so that I can be able to skip the line : x='b' in the main function.
#include <stdio.h>
void function (int a, int b, int c) {
int i, j;
char buf[5];
char buffer1[12];
int *ret;
}
int main() {
char x;
x = 'a';
printf ("Hello\n");
printf ("I am going to skip a statement\n");
function(1,2,3);
x = 'b';
printf ("By");
printf("The following value must be the a letter: %c\n",x);
}
I tried to get the return address and use the `ret' variable for adding the necessary bytes, but it seems that it's not correct.
ret=buffer1+12+4+1;
(*ret)+=4;
Anyway the x='b' is still executed.