...
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include <signal.h>
sig_atomic_t interrupted; /* Bug: not declared volatile */
void sigint_handler(int signum) {
interrupted = 1; /* Assignment may not be visible in main(). */
}
int main(void) {
signal(SIGINT, sigint_handler);
while (!interrupted) { /* Loop may never terminate. */
/* Do something */
}
return 0;
}
|
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
DCL34-C | lowLow | probableProbable | highHigh | P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| PRQA QA-C |
| 2782 | Partially implemented |
...