Skip to main content
assistive.skiplink.to.breadcrumbs
assistive.skiplink.to.header.menu
assistive.skiplink.to.action.menu
assistive.skiplink.to.quick.search
Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
SEI CERT C Coding Standard
Pages
Boards
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
View Page
A
t
tachments (0)
Page History
Page Information
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
…
SEI CERT C Coding Standard
4 Back Matter
EE. Analyzers
RuleChecker_V
Page Information
Title:
RuleChecker_V
Author:
Joerg Herter
Sep 04, 2017
Last Changed by:
Joerg Herter
Apr 16, 2024
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/LdcxBQ
Export As:
Word
·
PDF
Incoming Links
SEI CERT C Coding Standard (113)
Page:
ARR36-C. Do not subtract or compare two pointers that do not refer to the same array
Page:
EXP30-C. Do not depend on the order of evaluation for side effects
Page:
MSC40-C. Do not violate constraints
Page:
MSC24-C. Do not use deprecated or obsolescent functions
Page:
DCL05-C. Use typedefs of non-pointer types only
Page:
SIG31-C. Do not access shared objects in signal handlers
Page:
DCL01-C. Do not reuse variable names in subscopes
Page:
PRE32-C. Do not use preprocessor directives in invocations of function-like macros
Page:
PRE12-C. Do not define unsafe macros
Page:
PRE06-C. Enclose header files in an include guard
Page:
FLP37-C. Do not use object representations to compare floating-point values
Page:
ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array
Page:
FIO38-C. Do not copy a FILE object
Page:
ERR07-C. Prefer functions that support error checking over equivalent functions that don't
Page:
FLP02-C. Avoid using floating-point numbers when precise computation is needed
Page:
DCL20-C. Explicitly specify void when a function accepts no arguments
Page:
MSC09-C. Character encoding: Use subset of ASCII for safety
Page:
API04-C. Provide a consistent and usable error-checking mechanism
Page:
ENV32-C. All exit handlers must return normally
Page:
SIG34-C. Do not call signal() from within interruptible signal handlers
Page:
DCL13-C. Declare function parameters that are pointers to values not changed by the function as const
Page:
EXP09-C. Use sizeof to determine the size of a type or variable
Page:
DCL37-C. Do not declare or define a reserved identifier
Page:
PRE11-C. Do not conclude macro definitions with a semicolon
Page:
EXP45-C. Do not perform assignments in selection statements
Page:
EXP16-C. Do not compare function pointers to constant values
Page:
ERR33-C. Detect and handle standard library errors
Page:
MSC04-C. Use comments consistently and in a readable fashion
Page:
EXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
Page:
WIN01-C. Do not forcibly terminate execution
Page:
MEM34-C. Only free memory allocated dynamically
Page:
DCL30-C. Declare objects with appropriate storage durations
Page:
DCL16-C. Use "L," not "l," to indicate a long value
Page:
EXP46-C. Do not use a bitwise operator with a Boolean-like operand
Page:
INT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand
Page:
MSC41-C. Never hard code sensitive information
Page:
ARR39-C. Do not add or subtract a scaled integer to a pointer
Page:
MSC38-C. Do not treat a predefined identifier as an object if it might only be implemented as a macro
Page:
POS54-C. Detect and handle POSIX library errors
Page:
EXP42-C. Do not compare padding data
Page:
DCL31-C. Declare identifiers before using them
Page:
STR00-C. Represent characters using an appropriate type
Page:
STR37-C. Arguments to character-handling functions must be representable as an unsigned char
Page:
MSC20-C. Do not use a switch statement to transfer control into a complex block
Page:
DCL15-C. Declare file-scope objects or functions that do not need external linkage as static
Page:
EXP12-C. Do not ignore values returned by functions
Page:
ENV30-C. Do not modify the object referenced by the return value of certain functions
Page:
EXP37-C. Call functions with the correct number and type of arguments
Page:
SIG30-C. Call only asynchronous-safe functions within signal handlers
Page:
MSC01-C. Strive for logical completeness
Page:
MSC12-C. Detect and remove code that has no effect or is never executed
Page:
MSC30-C. Do not use the rand() function for generating pseudorandom numbers
Page:
MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
Page:
FIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
Page:
STR04-C. Use plain char for characters in the basic character set
Page:
ARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
Page:
MSC17-C. Finish every set of statements associated with a case label with a break statement
Page:
DCL36-C. Do not declare an identifier with conflicting linkage classifications
Page:
MSC07-C. Detect and remove dead code
Page:
EXP43-C. Avoid undefined behavior when using restrict-qualified pointers
Page:
DCL00-C. Const-qualify immutable objects
Page:
EXP19-C. Use braces for the body of an if, for, or while statement
Page:
CON40-C. Do not refer to an atomic variable twice in an expression
Page:
DCL23-C. Guarantee that mutually visible identifiers are unique
Page:
CON37-C. Do not call signal() in a multithreaded program
Page:
POS47-C. Do not use threads that can be canceled asynchronously
Page:
EXP05-C. Do not cast away a const qualification
Page:
STR09-C. Don't assume numeric values for expressions with type plain character
Page:
STR34-C. Cast characters to unsigned char before converting to larger integer sizes
Page:
EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
Page:
STR05-C. Use pointers to const when referring to string literals
Page:
DCL19-C. Minimize the scope of variables and functions
Page:
FIO34-C. Distinguish between characters read from a file and EOF or WEOF
Page:
PRE01-C. Use parentheses within macros around parameter names
Page:
ARR30-C. Do not form or use out-of-bounds pointers or array subscripts
Page:
ENV33-C. Do not call system()
Page:
EXP35-C. Do not modify objects with temporary lifetime
Page:
FLP32-C. Prevent or detect domain and range errors in math functions
Page:
PRE00-C. Prefer inline or static functions to function-like macros
Page:
STR10-C. Do not concatenate different type of string literals
Page:
STR38-C. Do not confuse narrow and wide character strings and functions
Page:
PRE07-C. Avoid using repeated question marks
Page:
EXP36-C. Do not cast pointers into more strictly aligned pointer types
Page:
INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
Page:
INT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression
Page:
PRE31-C. Avoid side effects in arguments to unsafe macros
Page:
DCL40-C. Do not create incompatible declarations of the same function or object
Page:
EXP33-C. Do not read uninitialized memory
Page:
EXP32-C. Do not access a volatile object through a nonvolatile reference
Page:
INT07-C. Use only explicitly signed or unsigned char type for numeric values
Page:
STR30-C. Do not attempt to modify string literals
Page:
MSC37-C. Ensure that control never reaches the end of a non-void function
Page:
EXP13-C. Treat relational and equality operators as if they were nonassociative
Page:
PRE30-C. Do not create a universal character name through concatenation
Page:
INT36-C. Converting a pointer to integer or integer to pointer
Page:
INT16-C. Do not make assumptions about representation of signed integers
Page:
MEM33-C. Allocate and copy structures containing a flexible array member dynamically
Page:
DCL07-C. Include the appropriate type information in function declarators
Page:
DCL18-C. Do not begin integer constants with 0 when specifying a decimal value
Page:
ERR32-C. Do not rely on indeterminate values of errno
Page:
INT13-C. Use bitwise operators only on unsigned operands
Page:
DCL41-C. Do not declare variables inside a switch statement before the first case label
Page:
INT09-C. Ensure enumeration constants map to unique values
Page:
EXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
Page:
ERR06-C. Understand the termination behavior of assert() and abort()
Page:
EXP40-C. Do not modify constant objects
Page:
RuleChecker
Page:
MSC33-C. Do not pass invalid data to the asctime() function
Page:
DCL39-C. Avoid information leakage when passing a structure across a trust boundary
Page:
MEM35-C. Allocate sufficient memory for an object
Page:
FLP30-C. Do not use floating-point variables as loop counters
Page:
ARR37-C. Do not add or subtract an integer to a pointer to a non-array object
Page:
EXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
Hierarchy
Parent Page
Page:
EE. Analyzers
Labels
There are no labels assigned to this page.
Recent Changes
Time
Editor
Apr 16, 2024 12:36
Joerg Herter
View Changes
May 15, 2023 08:54
Alexander Wagner
View Changes
May 27, 2022 09:29
Alexander Wagner
View Changes
Oct 09, 2020 08:55
Joerg Herter
View Changes
Aug 13, 2020 06:29
Joerg Herter
View Page History
Overview
Content Tools
{"serverDuration": 151, "requestCorrelationId": "ba5ca72aae3b4c57"}