GitHub
CERT Secure Coding

LDRA

This page was automatically generated and should not be edited.

The information on this page was provided by outside contributors and has not been verified by SEI CERT.

The table below can be re-ordered, by clicking column headers.

Tool Version: 9.7.1

CheckerGuideline
1 DMSC13-C. Detect and remove unused values
1 JMSC07-C. Detect and remove dead code
1 QPRE31-C. Avoid side effects in arguments to unsafe macros
1 QEXP30-C. Do not depend on the order of evaluation for side effects
1 QFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
1 QEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
1 QEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
1 QPRE12-C. Do not define unsafe macros
1 UMEM11-C. Do not assume infinite heap space
1 XDCL40-C. Do not create incompatible declarations of the same function or object
2 DMSC37-C. Ensure that control never reaches the end of a non-void function
2 XDCL36-C. Do not declare an identifier with conflicting linkage classifications
3 JMSC06-C. Beware of compiler optimizations
5 CMEM11-C. Do not assume infinite heap space
5 QMSC15-C. Do not depend on undefined behavior
6 DMEM11-C. Do not assume infinite heap space
7 SENV32-C. All exit handlers must return normally
8 DDCL22-C. Use volatile for data that cannot be cached
8 DMSC06-C. Beware of compiler optimizations
8 DMSC12-C. Detect and remove code that has no effect or is never executed
8 DMSC13-C. Detect and remove unused values
9 SPRE31-C. Avoid side effects in arguments to unsafe macros
9 SEXP30-C. Do not depend on the order of evaluation for side effects
9 SFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
11 SEXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
11 SEXP19-C. Use braces for the body of an if, for, or while statement
12 SEXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
12 SEXP19-C. Use braces for the body of an if, for, or while statement
15 DMSC13-C. Detect and remove unused values
17 DDCL40-C. Do not create incompatible declarations of the same function or object
17 DDCL23-C. Guarantee that mutually visible identifiers are unique
17 DMSC14-C. Do not introduce unnecessary platform dependencies
20 SDCL31-C. Declare identifiers before using them
21 SEXP37-C. Call functions with the correct number and type of arguments
21 SMSC40-C. Do not violate constraints
21 SDCL07-C. Include the appropriate type information in function declarators
24 DDCL31-C. Declare identifiers before using them
25 DDCL19-C. Minimize the scope of variables and functions
26 SMEM11-C. Do not assume infinite heap space
27 DDCL15-C. Declare file-scope objects or functions that do not need external linkage as static
28 DMEM11-C. Do not assume infinite heap space
30 SEXP30-C. Do not depend on the order of evaluation for side effects
30 SFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
35 DPRE31-C. Avoid side effects in arguments to unsafe macros
35 DEXP30-C. Do not depend on the order of evaluation for side effects
35 DFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
35 DEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
35 DEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
35 DPRE12-C. Do not define unsafe macros
35 SMSC06-C. Beware of compiler optimizations
36 SMSC37-C. Ensure that control never reaches the end of a non-void function
39 SFLP30-C. Do not use floating-point variables as loop counters
40 SDCL19-C. Minimize the scope of variables and functions
41 DDCL31-C. Declare identifiers before using them
41 DEXP37-C. Call functions with the correct number and type of arguments
41 SDCL10-C. Maintain the contract between the writer and caller of variadic functions
41 SDCL11-C. Understand the type issues associated with variadic functions
42 DDCL30-C. Declare objects with appropriate storage durations
42 DEXP35-C. Do not modify objects with temporary lifetime
42 SMSC14-C. Do not introduce unnecessary platform dependencies
43 DINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
43 DFLP03-C. Detect and handle floating-point errors
43 SMSC22-C. Use the setjmp(), longjmp() facility securely
44 SMEM36-C. Do not modify the alignment of objects by calling realloc()
44 SFIO40-C. Reset strings on fgets() or fgetws() failure
44 SSIG35-C. Do not return from a computational exception signal handler
44 SERR32-C. Do not rely on indeterminate values of errno
44 SERR34-C. Detect errors when converting a string to a number
44 SCON33-C. Avoid race conditions when using library functions
44 SCON37-C. Do not call signal() in a multithreaded program
44 SMSC30-C. Do not use the rand() function for generating pseudorandom numbers
44 SMSC33-C. Do not pass invalid data to the asctime() function
44 SDCL03-C. Use a static assertion to test the value of a constant expression
44 SERR01-C. Use ferror() rather than errno to check for FILE stream errors
44 SERR06-C. Understand the termination behavior of assert() and abort()
44 SERR07-C. Prefer functions that support error checking over equivalent functions that don't
44 SFIO03-C. Do not make assumptions about fopen() and file creation
44 SFIO05-C. Identify files using multiple file attributes
44 SFIO06-C. Create files with appropriate access permissions
44 SFIO09-C. Be careful with binary data when transferring data across systems
44 SFIO17-C. Do not rely on an ending null character when using fread()
44 SFIO18-C. Never expect fwrite() to terminate the writing process at a null character
44 SFIO19-C. Do not use fseek() and ftell() to compute the size of a regular file
44 SFIO20-C. Avoid unintentional truncation when using fgets() or fgetws()
44 SFIO21-C. Do not create temporary files in shared directories
44 SINT05-C. Do not use input functions to convert character data if they cannot handle all possible inputs
44 SMEM03-C. Clear sensitive information stored in reusable resources
44 SMEM05-C. Avoid large stack allocations
44 SMSC24-C. Do not use deprecated or obsolescent functions
44 SSIG00-C. Mask signals handled by noninterruptible signal handlers
44 SSIG02-C. Avoid using signals to implement normal functionality
44 SSTR03-C. Do not inadvertently truncate a string
45 DEXP34-C. Do not dereference null pointers
45 DARR30-C. Do not form or use out-of-bounds pointers or array subscripts
45 DARR00-C. Understand how arrays work
45 DEXP08-C. Ensure pointer arithmetic is used correctly
47 SARR30-C. Do not form or use out-of-bounds pointers or array subscripts
47 SARR39-C. Do not add or subtract a scaled integer to a pointer
47 SARR00-C. Understand how arrays work
48 DFIO46-C. Do not access a closed file
48 DMSC15-C. Do not depend on undefined behavior
48 SMSC01-C. Strive for logical completeness
49 DFIO42-C. Close files when they are no longer needed
49 DFIO22-C. Close files before spawning processes
49 SEXP00-C. Use parentheses for precedence of operation
50 DMEM31-C. Free dynamically allocated memory when no longer needed
50 DMEM00-C. Allocate and free memory in the same module, at the same level of abstraction
50 DMEM12-C. Consider using a goto chain when leaving a function on error when using and releasing resources
50 SINT13-C. Use bitwise operators only on unsigned operands
50 SINT16-C. Do not make assumptions about representation of signed integers
51 DMEM30-C. Do not access freed memory
51 SINT34-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
52 SINT02-C. Understand integer conversion rules
53 DEXP33-C. Do not read uninitialized memory
53 DEXP08-C. Ensure pointer arithmetic is used correctly
54 DEXP08-C. Ensure pointer arithmetic is used correctly
54 SEXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
56 SFLP02-C. Avoid using floating-point numbers when precise computation is needed
57 SMSC06-C. Beware of compiler optimizations
57 SMSC12-C. Detect and remove code that has no effect or is never executed
59 SMSC01-C. Strive for logical completeness
61 DDCL15-C. Declare file-scope objects or functions that do not need external linkage as static
61 DDCL19-C. Minimize the scope of variables and functions
61 XDCL23-C. Guarantee that mutually visible identifiers are unique
62 SMSC17-C. Finish every set of statements associated with a case label with a break statement
62 XMSC15-C. Do not depend on undefined behavior
63 DMSC15-C. Do not depend on undefined behavior
63 SDCL20-C. Explicitly specify void when a function accepts no arguments
63 XMSC15-C. Do not depend on undefined behavior
64 SMSC15-C. Do not depend on undefined behavior
64 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
64 XARR38-C. Guarantee that library functions do not form invalid pointers
64 XARR39-C. Do not add or subtract a scaled integer to a pointer
64 XARR00-C. Understand how arrays work
65 DMSC06-C. Beware of compiler optimizations
65 DMSC12-C. Detect and remove code that has no effect or is never executed
65 SMSC15-C. Do not depend on undefined behavior
66 SMSC37-C. Ensure that control never reaches the end of a non-void function
66 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
66 XARR38-C. Guarantee that library functions do not form invalid pointers
66 XARR39-C. Do not add or subtract a scaled integer to a pointer
66 XSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
66 XARR00-C. Understand how arrays work
67 XDCL02-C. Use visually distinct identifiers
68 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
68 XARR38-C. Guarantee that library functions do not form invalid pointers
68 XARR39-C. Do not add or subtract a scaled integer to a pointer
68 XARR00-C. Understand how arrays work
69 DEXP33-C. Do not read uninitialized memory
69 SMSC14-C. Do not introduce unnecessary platform dependencies
69 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
69 XARR38-C. Guarantee that library functions do not form invalid pointers
69 XARR39-C. Do not add or subtract a scaled integer to a pointer
69 XARR00-C. Understand how arrays work
70 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
70 XARR38-C. Guarantee that library functions do not form invalid pointers
70 XARR39-C. Do not add or subtract a scaled integer to a pointer
70 XSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
70 XARR00-C. Understand how arrays work
71 SDCL30-C. Declare objects with appropriate storage durations
71 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
71 XARR38-C. Guarantee that library functions do not form invalid pointers
71 XARR39-C. Do not add or subtract a scaled integer to a pointer
71 XSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
71 XARR00-C. Understand how arrays work
72 DEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
73 SINT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression
75 DFIO45-C. Avoid TOCTOU race conditions while accessing files
75 DFIO24-C. Do not open a file that is already open
76 DMSC06-C. Beware of compiler optimizations
76 SPRE05-C. Understand macro replacement when concatenating tokens or performing stringification
77 DDCL30-C. Declare objects with appropriate storage durations
77 DEXP35-C. Do not modify objects with temporary lifetime
77 SPRE02-C. Macro replacement lists should be parenthesized
78 DDCL00-C. Const-qualify immutable objects
78 SPRE01-C. Use parentheses within macros around parameter names
79 SPRE10-C. Wrap multistatement macros in a do-while loop
79 SPRE11-C. Do not conclude macro definitions with a semicolon
79 XARR30-C. Do not form or use out-of-bounds pointers or array subscripts
79 XARR38-C. Guarantee that library functions do not form invalid pointers
80 DERR33-C. Detect and handle standard library errors
80 DPOS54-C. Detect and handle POSIX library errors
80 XINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
81 DFIO08-C. Take care when calling remove() on an open file
81 SPRE07-C. Avoid using repeated question marks
82 DFIO44-C. Only use values for fsetpos() that are returned from fgetpos()
83 DFIO13-C. Never push back anything other than one read character
83 SDCL18-C. Do not begin integer constants with 0 when specifying a decimal value
84 DFIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call
84 DMSC15-C. Do not depend on undefined behavior
85 DFIO02-C. Canonicalize path names originating from tainted sources
85 SINT09-C. Ensure enumeration constants map to unique values
86 DFIO30-C. Exclude user input from format strings
86 SDCL37-C. Do not declare or define a reserved identifier
87 DSIG31-C. Do not access shared objects in signal handlers
88 DSIG30-C. Call only asynchronous-safe functions within signal handlers
89 DSIG30-C. Call only asynchronous-safe functions within signal handlers
93 DDCL00-C. Const-qualify immutable objects
93 SINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
93 SFLP34-C. Ensure that floating-point conversions are within range of the new type
93 SINT02-C. Understand integer conversion rules
93 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
93 SSTR04-C. Use plain char for characters in the basic character set
94 DMSC13-C. Detect and remove unused values
94 SEXP36-C. Do not cast pointers into more strictly aligned pointer types
94 SEXP39-C. Do not access a variable through a pointer of an incompatible type
96 SINT02-C. Understand integer conversion rules
96 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
96 SMSC05-C. Do not manipulate time_t typed values directly
97 DSIG34-C. Do not call signal() from within interruptible signal handlers
97 DSIG01-C. Understand implementation-specific details regarding signal handler persistence
98 SEXP37-C. Call functions with the correct number and type of arguments
99 SEXP16-C. Do not compare function pointers to constant values
100 SMSC15-C. Do not depend on undefined behavior
101 SINT02-C. Understand integer conversion rules
101 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
101 SMSC05-C. Do not manipulate time_t typed values directly
101 SSTR04-C. Use plain char for characters in the basic character set
104 DDCL12-C. Implement abstract data types using opaque types
105 DMSC06-C. Beware of compiler optimizations
105 DMSC12-C. Detect and remove code that has no effect or is never executed
105 DMSC13-C. Detect and remove unused values
107 DENV30-C. Do not modify the object referenced by the return value of certain functions
107 SINT02-C. Understand integer conversion rules
107 SMSC05-C. Do not manipulate time_t typed values directly
108 DSTR02-C. Sanitize data passed to complex subsystems
109 DSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
109 DSTR02-C. Sanitize data passed to complex subsystems
109 SMSC15-C. Do not depend on undefined behavior
111 DERR30-C. Take care when reading errno
112 DMEM30-C. Do not access freed memory
112 DMEM01-C. Store a new value in pointers immediately after free()
113 DMSC15-C. Do not depend on undefined behavior
113 SMSC09-C. Character encoding: Use subset of ASCII for safety
114 SEXP45-C. Do not perform assignments in selection statements
114 SEXP20-C. Perform explicit tests to determine success, true and false, and equality
115 DMEM35-C. Allocate sufficient memory for an object
115 SSTR03-C. Do not inadvertently truncate a string
118 SENV31-C. Do not rely on an environment pointer following an operation that may invalidate it
119 SMSC04-C. Use comments consistently and in a readable fashion
120 DDCL13-C. Declare function parameters that are pointers to values not changed by the function as const
120 SINT13-C. Use bitwise operators only on unsigned operands
120 SINT16-C. Do not make assumptions about representation of signed integers
121 DERR30-C. Take care when reading errno
122 DERR30-C. Take care when reading errno
122 SENV32-C. All exit handlers must return normally
123 DEXP34-C. Do not dereference null pointers
125 DMEM34-C. Only free memory allocated dynamically
125 SPRE05-C. Understand macro replacement when concatenating tokens or performing stringification
127 DINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
127 SARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
128 DEXP34-C. Do not dereference null pointers
129 DEXP34-C. Do not dereference null pointers
130 DEXP34-C. Do not dereference null pointers
131 DEXP34-C. Do not dereference null pointers
131 SDCL01-C. Do not reuse variable names in subscopes
132 DERR30-C. Take care when reading errno
132 SEXP45-C. Do not perform assignments in selection statements
133 DENV34-C. Do not store pointers returned by certain functions
133 SEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
134 DERR30-C. Take care when reading errno
134 SEXP30-C. Do not depend on the order of evaluation for side effects
134 SFIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects
134 SDCL17-C. Beware of miscompiled volatile-qualified variables
134 SEXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
135 SDCL07-C. Include the appropriate type information in function declarators
136 SEXP46-C. Do not use a bitwise operator with a Boolean-like operand
139 SMSC07-C. Detect and remove dead code
139 SMSC12-C. Detect and remove code that has no effect or is never executed
140 SMEM11-C. Do not assume infinite heap space
140 SMSC07-C. Detect and remove dead code
140 SMSC12-C. Detect and remove code that has no effect or is never executed
145 SMSC40-C. Do not violate constraints
156 SMSC15-C. Do not depend on undefined behavior
157 SSTR30-C. Do not attempt to modify string literals
159 SMEM10-C. Define and use a pointer validation function
170 SEXP37-C. Call functions with the correct number and type of arguments
170 SDCL07-C. Include the appropriate type information in function declarators
176 SMSC10-C. Character encoding: UTF8-related issues
200 SDCL00-C. Const-qualify immutable objects
201 SDCL06-C. Use meaningful symbolic constants to represent literal values
201 SEXP07-C. Do not diminish the benefits of constants by assuming their values in expressions
201 SEXP09-C. Use sizeof to determine the size of a type or variable
203 SEXP05-C. Do not cast away a const qualification
218 SDCL37-C. Do not declare or define a reserved identifier
219 SDCL37-C. Do not declare or define a reserved identifier
243 SPRE06-C. Enclose header files in an include guard
245 SMSC20-C. Do not use a switch statement to transfer control into a complex block
248 SINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
252 SDCL16-C. Use "L," not "l," to indicate a long value
296 SMSC15-C. Do not depend on undefined behavior
299 SDCL05-C. Use typedefs of non-pointer types only
302 SMSC04-C. Use comments consistently and in a readable fashion
323 SMSC40-C. Do not violate constraints
324 SMSC15-C. Do not depend on undefined behavior
326 SDCL31-C. Declare identifiers before using them
329 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
329 SSTR00-C. Represent characters using an appropriate type
329 SSTR04-C. Use plain char for characters in the basic character set
329 SSTR09-C. Don't assume numeric values for expressions with type plain character
331 SINT13-C. Use bitwise operators only on unsigned operands
332 SINT02-C. Understand integer conversion rules
334 SINT02-C. Understand integer conversion rules
335 SMSC15-C. Do not depend on undefined behavior
336 SMSC15-C. Do not depend on undefined behavior
339 SMSC15-C. Do not depend on undefined behavior
340 SPRE00-C. Prefer inline or static functions to function-like macros
341 SPRE32-C. Do not use preprocessor directives in invocations of function-like macros
344 SEXP32-C. Do not access a volatile object through a nonvolatile reference
345 SMSC40-C. Do not violate constraints
355 SDCL23-C. Guarantee that mutually visible identifiers are unique
361 SEXP00-C. Use parentheses for precedence of operation
376 SMSC10-C. Character encoding: UTF8-related issues
382 SEXP12-C. Do not ignore values returned by functions
385 SDCL41-C. Do not declare variables inside a switch statement before the first case label
387 SMSC40-C. Do not violate constraints
397 SARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
400 SMEM35-C. Allocate sufficient memory for an object
401 SARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array
403 SINT34-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
404 SSTR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string
404 SMSC40-C. Do not violate constraints
404 SARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
404 SSTR11-C. Do not specify the bound of a character array initialized with a string literal
406 SEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
407 SMEM34-C. Only free memory allocated dynamically
408 SEXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
412 SMSC15-C. Do not depend on undefined behavior
427 SMSC15-C. Do not depend on undefined behavior
428 SEXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
428 SEXP19-C. Use braces for the body of an if, for, or while statement
432 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
432 SSTR00-C. Represent characters using an appropriate type
432 SSTR04-C. Use plain char for characters in the basic character set
433 SINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
433 SEXP13-C. Treat relational and equality operators as if they were nonassociative
433 SINT02-C. Understand integer conversion rules
433 SMSC05-C. Do not manipulate time_t typed values directly
434 SINT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
434 SSTR34-C. Cast characters to unsigned char before converting to larger integer sizes
434 SINT02-C. Understand integer conversion rules
435 SFLP34-C. Ensure that floating-point conversions are within range of the new type
435 SFLP36-C. Preserve precision when converting integral values to floating-point type
435 SFLP06-C. Convert integers to floating point for floating-point operations
437 SARR36-C. Do not subtract or compare two pointers that do not refer to the same array
438 SARR36-C. Do not subtract or compare two pointers that do not refer to the same array
438 SEXP08-C. Ensure pointer arithmetic is used correctly
439 SINT36-C. Converting a pointer to integer or integer to pointer
440 SINT36-C. Converting a pointer to integer or integer to pointer
446 SINT02-C. Understand integer conversion rules
450 SSTR10-C. Do not concatenate different type of string literals
452 SINT02-C. Understand integer conversion rules
452 SINT18-C. Evaluate integer expressions in a larger size before comparing or assigning to that size
457 SINT02-C. Understand integer conversion rules
458 SINT02-C. Understand integer conversion rules
458 SINT07-C. Use only explicitly signed or unsigned char type for numeric values
458 SMSC05-C. Do not manipulate time_t typed values directly
458 SSTR04-C. Use plain char for characters in the basic character set
461 SDCL36-C. Do not declare an identifier with conflicting linkage classifications
465 SMSC15-C. Do not depend on undefined behavior
476 SARR30-C. Do not form or use out-of-bounds pointers or array subscripts
479 SINT34-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
480 SEXP43-C. Avoid undefined behavior when using restrict-qualified pointers
481 SMSC40-C. Do not violate constraints
482 SMSC15-C. Do not depend on undefined behavior
483 SMEM34-C. Only free memory allocated dynamically
484 SMEM30-C. Do not access freed memory
484 SMEM01-C. Store a new value in pointers immediately after free()
486 SFIO47-C. Use valid format strings
487 SMEM35-C. Allocate sufficient memory for an object
488 SINT08-C. Verify that all integer values are in range
489 SEXP43-C. Avoid undefined behavior when using restrict-qualified pointers
489 SARR30-C. Do not form or use out-of-bounds pointers or array subscripts
489 SARR39-C. Do not add or subtract a scaled integer to a pointer
489 SSTR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
489 SARR00-C. Understand how arrays work
493 SINT30-C. Ensure that unsigned integer operations do not wrap
493 SINT32-C. Ensure that operations on signed integers do not result in overflow
493 SINT08-C. Verify that all integer values are in range
493 SINT08-C. Verify that all integer values are in range
494 SINT30-C. Ensure that unsigned integer operations do not wrap
494 SINT32-C. Ensure that operations on signed integers do not result in overflow
496 SDCL31-C. Declare identifiers before using them
496 SEXP37-C. Call functions with the correct number and type of arguments
497 SMSC15-C. Do not depend on undefined behavior
510 SMSC21-C. Use robust loop termination conditions
545 SMSC15-C. Do not depend on undefined behavior
553 SDCL15-C. Declare file-scope objects or functions that do not need external linkage as static
554 SEXP39-C. Do not access a variable through a pointer of an incompatible type
554 SEXP11-C. Do not make assumptions regarding the layout of structures with bit-fields
562 SPRE31-C. Avoid side effects in arguments to unsafe macros
562 SPRE12-C. Do not define unsafe macros
565 SDCL30-C. Declare objects with appropriate storage durations
567 SARR37-C. Do not add or subtract an integer to a pointer to a non-array object
567 SARR39-C. Do not add or subtract a scaled integer to a pointer
567 SARR00-C. Understand how arrays work
568 SPRE04-C. Do not reuse a standard header file name
572 SPRE31-C. Avoid side effects in arguments to unsafe macros
572 SPRE12-C. Do not define unsafe macros
573 SPRE30-C. Do not create a universal character name through concatenation
575 SDCL36-C. Do not declare an identifier with conflicting linkage classifications
576 SEXP37-C. Call functions with the correct number and type of arguments
576 SEXP08-C. Ensure pointer arithmetic is used correctly
578 SEXP03-C. Do not assume the size of a structure is the sum of the sizes of its members
579 SDCL04-C. Do not declare more than one variable per declaration
580 SDCL37-C. Do not declare or define a reserved identifier
580 SMSC40-C. Do not violate constraints
582 SEXP40-C. Do not modify constant objects
584 SINT10-C. Do not assume a positive remainder when using the % operator
585 SINT14-C. Avoid performing bitwise and arithmetic operations on the same data
586 SINT15-C. Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types
587 SMSC15-C. Do not depend on undefined behavior
588 SENV33-C. Do not call system()
588 SENV03-C. Sanitize the environment when invoking external programs
589 SFIO47-C. Use valid format strings
589 SDCL11-C. Understand the type issues associated with variadic functions
590 SFIO11-C. Take care when specifying the mode parameter of fopen()
591 SFIO38-C. Do not copy a FILE object
592 SFIO01-C. Be careful using functions that use file names for identification
592 SFIO10-C. Take care when using the rename() function
593 SERR07-C. Prefer functions that support error checking over equivalent functions that don't
594 SERR07-C. Prefer functions that support error checking over equivalent functions that don't
600 SSTR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string
602 SSTR06-C. Do not assume that strtok() leaves the parse string unchanged
606 SEXP36-C. Do not cast pointers into more strictly aligned pointer types
608 SMSC15-C. Do not depend on undefined behavior
611 SMSC04-C. Use comments consistently and in a readable fashion
612 SMSC40-C. Do not violate constraints
613 SEXP43-C. Avoid undefined behavior when using restrict-qualified pointers
615 SMSC40-C. Do not violate constraints
618 SEXP42-C. Do not compare padding data
618 SFLP37-C. Do not use object representations to compare floating-point values
621 SARR32-C. Ensure size arguments for variable length arrays are in a valid range
623 SSTR05-C. Use pointers to const when referring to string literals
626 SDCL37-C. Do not declare or define a reserved identifier
629 SINT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
630 SINT09-C. Ensure enumeration constants map to unique values
631 SEXP33-C. Do not read uninitialized memory
634 SDCL09-C. Declare functions that return errno with a return type of errno_t
637 SPRE05-C. Understand macro replacement when concatenating tokens or performing stringification
642 SEXP35-C. Do not modify objects with temporary lifetime
642 SMSC15-C. Do not depend on undefined behavior
644 SMEM34-C. Only free memory allocated dynamically
645 SMEM34-C. Only free memory allocated dynamically
646 SMSC40-C. Do not violate constraints
648 SDCL38-C. Use the correct syntax when declaring a flexible array member
649 SMEM33-C. Allocate and copy structures containing a flexible array member dynamically
650 SMEM33-C. Allocate and copy structures containing a flexible array member dynamically
652 SEXP33-C. Do not read uninitialized memory
652 SEXP34-C. Do not dereference null pointers
653 SEXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
662 SFIO34-C. Distinguish between characters read from a file and EOF or WEOF
663 SSTR37-C. Arguments to character-handling functions must be representable as an unsigned char
I JMSC06-C. Beware of compiler optimizations
I JMSC12-C. Detect and remove code that has no effect or is never executed
Partially implementedPRE13-C. Use the Standard predefined macros to test for versions and features.