Chapter 3. Declarations and Initialization (DCL)
Recommendations and Rules
Risk Assessment Summary
DCL00-C. const
-qualify immutable objects
Immutable objects should be const
-qualified. Enforcing object immutability using const
qualification helps ensure the correctness and security of applications. ISO/IEC PDTR 24772, for example, recommends labeling parameters as constant to avoid the unintentional modification of function arguments. STR05-C, “Use pointers to const
when referring to string literals,” describes a specialized case of this recommendation. ...
Get The CERT® C Secure Coding Standard now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.