Research Article
Fine-Grained Control-Flow Integrity Based on Points-to Analysis for CPS
Listing 2
Code snippet of function pointer assignments and indirect call cites.
1int main(int argc, char argv) | 2 | 3 int num; | 4 scanf("%d", &num); | 5 | 6 if(num == 1) | 7 pointer_one = foo; | 8 } else | 9 pointer_one = bar; | 10 } | 11 pointer_two = foo; | 12 pointer_two = bar; | 13 pointer_three = foo; | 14 | 15 pointer_one(); | 16 pointer_two(); | 17 pointer_three(); | 18 | 19 return 0; | 20 } |
|