I was solving bof challenge on <http://pwnable.kr/play.php>
it is required to smash the stack of the following code 

```
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void func(int key){
    char overflowme[32];
    printf("overflow me : ");
    gets(overflowme);   // smash me!
    if(key != 0xcafebabe){
        system("/bin/sh");
    }
    else{
        printf("Nah..\n");
    }
}
int main(int argc, char* argv[]){
    func(0xdeadbeef);
    return 0;
}

```

and I was given compiler version of that I was supposed to exploit
the task was straightforward but when I overflow the array `overflowme` the control I never transfered to `/bin/sh` instead I get something like
`*** stack smashing detected ***: ./bof terminated`
attempt1:
try filling the array with zeros except for the `key` but failed
attempt2:
get memory dump for where the array is stored and overflow the array with that dump but still failed