Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created September 28, 2016 16:10
Show Gist options
  • Save AndyNovo/1fcfd93bd481216f04b949732939405e to your computer and use it in GitHub Desktop.
Save AndyNovo/1fcfd93bd481216f04b949732939405e to your computer and use it in GitHub Desktop.
#include <string.h>
void foo (char *bar)
{
char c[12];
strcpy(c, bar); // no bounds checking
}
int main (int argc, char **argv)
{
foo(argv[1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment