Skip to content

Instantly share code, notes, and snippets.

@Keith-S-Thompson
Created April 7, 2012 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keith-S-Thompson/2324873 to your computer and use it in GitHub Desktop.
Save Keith-S-Thompson/2324873 to your computer and use it in GitHub Desktop.
Invalid pointer demo
int main(void) {
int *ptr;
{
int obj;
ptr = &obj;
/* ptr is valid */
}
/* ptr is now invalid */
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment