Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
- void getString()
- {
- char buffer[64];
- unsigned int ret;
- printf("Input string: "); fflush(stdout);
- gets(buffer);
- ret = __builtin_return_address(0);
- if((ret & 0xbf000000) == 0xbf000000) {
- printf("bzzzt (%p)\n", ret);
- _exit(1);
- }
- printf("Got string %s\n", buffer);
- }
- int main(int argc, char **argv)
- {
- getString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement