Skip to content

Instantly share code, notes, and snippets.

@ProfAvery
Last active October 8, 2024 17:40
Show Gist options
  • Save ProfAvery/fca2e0d666cc7d867196c5fe8807777d to your computer and use it in GitHub Desktop.
Save ProfAvery/fca2e0d666cc7d867196c5fe8807777d to your computer and use it in GitHub Desktop.
CPSC 458 - ASLR and stack-protector demos
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int c;
printf ("c is at %p.\n", &c);
return EXIT_SUCCESS;
}
#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