01.07.2016 Views

SEI CERT C Coding Standard

tqcylJ

tqcylJ

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.11 CON40-C. Do not refer to an atomic variable twice in an expression 447<br />

14.12 CON41-C. Wrap functions that can fail spuriously in a loop 451<br />

15 Miscellaneous (MSC) 455<br />

15.1 MSC30-C. Do not use the rand() function for generating pseudorandom numbers 455<br />

15.2 MSC32-C. Properly seed pseudorandom number generators 459<br />

15.3 MSC33-C. Do not pass invalid data to the asctime() function 463<br />

15.4 MSC37-C. Ensure that control never reaches the end of a non-void function 466<br />

15.5 MSC38-C. Do not treat a predefined identifier as an object if it might only<br />

be implemented as a macro 470<br />

15.6 MSC39-C. Do not call va_arg() on a va_list that has an indeterminate value 473<br />

15.7 MSC40-C. Do not violate constraints 476<br />

Appendix A: Bibliography 481<br />

Appendix B: Definitions 501<br />

Appendix C: Undefined Behavior 510<br />

Appendix D: Unspecified Behavior 525<br />

<strong>SEI</strong> <strong>CERT</strong> C <strong>Coding</strong> <strong>Standard</strong>: Rules for Developing Safe, Reliable, and Secure Systems<br />

Software Engineering Institute | Carnegie Mellon University<br />

[DISTRIBUTION STATEMENT A] Approved for public release and unlimited distribution.<br />

iv

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!