aboutsummaryrefslogtreecommitdiff
path: root/slides/2018-software-security/sample/stack-frame.c
blob: b5c962fc38bac438da708928d7386adbae860e69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int add(int a, int b)
{
  int result;
  result = a+b;
  return result;
}

int sub(int a, int b)
{
  int result;
  result = add(a,-b);
  return result;
}

int algorithm()
{
  printf("result: %d\n", sub(2,1));
}