Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider (sch jbop) (X_X)@==(Q_Q)@

...

Code Block
bgColor#ffcccc
#include <signal.h> 
 
size_t i; 
 
void handler() { 
  i = 0; 
} 
 
int main(void) { 
  signal(SIGINT, handler); 
  i = 1; 
  while (i) { 
   /* do something */ 
  } 
} 

...

Code Block
bgColor#ccccff
#include <signal.h> 
 
volatile size_t i; 
 
void handler() { 
  i = 0; 
} 
 
int main(void) { 
  signal(SIGINT, handler); 
  i = 1; 
  while (i) { 
   /* do something */ 
  } 
}

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL34-C

2 (medium)

2 (probable)

3 (low)

P12

L1

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

References

Wiki Markup
\[[ISO/IEC 9899-1999:TC2|AA. C References#ISO/IEC 9899-1999TC2]\] Section 6.7.3, "Type qualifiers"
\[[ISO/IEC 03|AA. C References#ISO/IEC 03]\] Section 6.7.3, "Type qualifiers"
\[[Sun 05|AA. C References#Sun 05]\] [Chapter 6, "Transitioning to ISO C"|http://docs.sun.com/source/819-3688/tguide.html#pgfId-997898]