aboutsummaryrefslogtreecommitdiff
path: root/overflow_function.c
blob: 6d6e9503c20ea587c4f9f2b4226848c619e9fe7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void stupid(char *str)
{
  char buf[30];
  /* exploitable function */
  strcpy(buf, str);
}

int main(int argc, char **argv)
{
  stupid(argv[1]);
  return 0;
}