...
| Code Block | ||||
|---|---|---|---|---|
| ||||
int func(int expr) {
switch(expr){
int i = 4;
f(i);
case 0:
i = 17;
/* Falls through into default code */
default:
printf(“%d\nâ€"%d\n"€, i);
}
return 0;
}
|
Implementation Details
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
int func(int expr) {
int i = 4; /* Move the code outside the switch block */
f(i); /* Now the statements will get executed */
switch(expr) {
case 0:
i = 17;
/* Falls through into default code */
default:
printf(“%d\nâ€"€œ%d\n"€, i);
}
return 0;
}
|
Risk Assessment
...