Skip to content

Instantly share code, notes, and snippets.

@vanhoefm
Created November 2, 2012 21:38
Show Gist options
  • Save vanhoefm/4004504 to your computer and use it in GitHub Desktop.
Save vanhoefm/4004504 to your computer and use it in GitHub Desktop.
Stack investigation
#include <stdio.h>
int main(int argc, char *argv[], char *envp[])
{
int esp;
printf("env: %p\narg: %p\nesp: %p\n", envp, argv, &esp);
while (*envp != NULL) {
printf("%s\n", *envp);
++envp;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment