-
-
Save ProfAvery/fca2e0d666cc7d867196c5fe8807777d to your computer and use it in GitHub Desktop.
CPSC 458 - ASLR and stack-protector demos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int | |
main () | |
{ | |
int c; | |
printf ("c is at %p.\n", &c); | |
return EXIT_SUCCESS; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int | |
main () | |
{ | |
char s[10]; | |
strcpy (s, "This is a very long string."); | |
printf (s); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment