 
                            ...
| Code Block | ||
|---|---|---|
| 
 | ||
| 
#include <signal.h> 
 
char *err_msg; 
volatile static int e_flag = 0;
 
void handler() { 
  e_flag = 1;
} 
 
int main() { 
  signal(SIGINT, handler); 
  err_msg = malloc(24);
  strcpy(err_msg, "No errors yet.");
 
  /* main code loop */
  if(e_flag)
    strcpy(err_msg, "SIGINT received.");
  return 0;
}
 | 
Risk Assessment
| Wiki Markup | 
|---|
| Depending on the code, this could lead to any number of attacks, many of which could give root access. For an overview of some software vulnerabilities, see | 
| \[[Zalewski 06|AA. C References#Zalewski 06]\]. | 
| Rule | Severity | Likelihood | Remediation Cost | Priority | Level | 
|---|---|---|---|---|---|
| SIG31-C | 3 (high) | 3 (likely) | 1 (high) | P9 | L2 | 
...