Title: Rose  
Author: Astha Singhal Feb 10, 2012
Last Changed by: David Svoboda Oct 14, 2024
Tiny Link: (useful for email) https://wiki.sei.cmu.edu/confluence/x/itUxBQ
Export As: Word · PDF  
Incoming Links
SEI CERT C Coding Standard (120)
    Page: INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
    Page: DCL00-C. Const-qualify immutable objects
    Page: ENV31-C. Do not rely on an environment pointer following an operation that may invalidate it
    Page: MSC01-C. Strive for logical completeness
    Page: ERR05-C. Application-independent code should provide error detection without dictating error handling
    Page: ENV30-C. Do not modify the object referenced by the return value of certain functions
    Page: POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument
    Page: STR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string
    Page: POS36-C. Observe correct revocation order while relinquishing privileges
    Page: EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic
    Page: DCL31-C. Declare identifiers before using them
    Page: INT15-C. Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types
    Page: DCL06-C. Use meaningful symbolic constants to represent literal values
    Page: MSC05-C. Do not manipulate time_t typed values directly
    Page: FLP34-C. Ensure that floating-point conversions are within range of the new type
    Page: INT08-C. Verify that all integer values are in range
    Page: EXP12-C. Do not ignore values returned by functions
    Page: INT13-C. Use bitwise operators only on unsigned operands
    Page: INT01-C. Use rsize_t or size_t for all integer values representing the size of an object
    Page: MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
    Page: MEM34-C. Only free memory allocated dynamically
    Page: MSC30-C. Do not use the rand() function for generating pseudorandom numbers
    Page: POS54-C. Detect and handle POSIX library errors
    Page: STR04-C. Use plain char for characters in the basic character set
    Page: INT05-C. Do not use input functions to convert character data if they cannot handle all possible inputs
    Page: STR37-C. Arguments to character-handling functions must be representable as an unsigned char
    Page: CON33-C. Avoid race conditions when using library functions
    Page: FIO09-C. Be careful with binary data when transferring data across systems
    Page: MEM31-C. Free dynamically allocated memory when no longer needed
    Page: INT36-C. Converting a pointer to integer or integer to pointer
    Page: SIG34-C. Do not call signal() from within interruptible signal handlers
    Page: EXP45-C. Do not perform assignments in selection statements
    Page: DCL37-C. Do not declare or define a reserved identifier
    Page: INT10-C. Do not assume a positive remainder when using the % operator
    Page: ENV34-C. Do not store pointers returned by certain functions
    Page: EXP32-C. Do not access a volatile object through a nonvolatile reference
    Page: DCL30-C. Declare objects with appropriate storage durations
    Page: STR05-C. Use pointers to const when referring to string literals
    Page: EXP36-C. Do not cast pointers into more strictly aligned pointer types
    Page: FIO42-C. Close files when they are no longer needed
    Page: FIO32-C. Do not perform operations on devices that are only appropriate for files
    Page: POS35-C. Avoid race conditions while checking for the existence of a symbolic link
    Page: MSC17-C. Finish every set of statements associated with a case label with a break statement
    Page: MSC21-C. Use robust loop termination conditions
    Page: STR11-C. Do not specify the bound of a character array initialized with a string literal
    Page: EXP14-C. Beware of integer promotion when performing bitwise operations on integer types smaller than int
    Page: FIO46-C. Do not access a closed file
    Page: DCL23-C. Guarantee that mutually visible identifiers are unique
    Page: EXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place
    Page: FLP02-C. Avoid using floating-point numbers when precise computation is needed
    Page: ARR30-C. Do not form or use out-of-bounds pointers or array subscripts
    Page: ERR33-C. Detect and handle standard library errors
    Page: INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
    Page: FIO30-C. Exclude user input from format strings
    Page: ARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer
    Page: EXP09-C. Use sizeof to determine the size of a type or variable
    Page: MEM01-C. Store a new value in pointers immediately after free()
    Page: ENV01-C. Do not make assumptions about the size of an environment variable
    Page: DCL03-C. Use a static assertion to test the value of a constant expression
    Page: MEM35-C. Allocate sufficient memory for an object
    Page: DCL38-C. Use the correct syntax when declaring a flexible array member
    Page: STR06-C. Do not assume that strtok() leaves the parse string unchanged
    Page: ERR34-C. Detect errors when converting a string to a number
    Page: STR03-C. Do not inadvertently truncate a string
    Page: DCL13-C. Declare function parameters that are pointers to values not changed by the function as const
    Page: EXP30-C. Do not depend on the order of evaluation for side effects
    Page: FIO02-C. Canonicalize path names originating from tainted sources
    Page: FIO21-C. Do not create temporary files in shared directories
    Page: SIG30-C. Call only asynchronous-safe functions within signal handlers
    Page: MEM00-C. Allocate and free memory in the same module, at the same level of abstraction
    Page: DCL02-C. Use visually distinct identifiers
    Page: EXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
    Page: FIO11-C. Take care when specifying the mode parameter of fopen()
    Page: FIO22-C. Close files before spawning processes
    Page: INT30-C. Ensure that unsigned integer operations do not wrap
    Page: DCL01-C. Do not reuse variable names in subscopes
    Page: EXP11-C. Do not make assumptions regarding the layout of structures with bit-fields
    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: POS30-C. Use the readlink() function properly
    Page: EXP37-C. Call functions with the correct number and type of arguments
    Page: FLP06-C. Convert integers to floating point for floating-point operations
    Page: FLP03-C. Detect and handle floating-point errors
    Page: DCL05-C. Use typedefs of non-pointer types only
    Page: MEM03-C. Clear sensitive information stored in reusable resources
    Page: STR30-C. Do not attempt to modify string literals
    Page: FIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call
    Page: MEM04-C. Beware of zero-length allocations
    Page: SIG31-C. Do not access shared objects in signal handlers
    Page: ERR06-C. Understand the termination behavior of assert() and abort()
    Page: FIO13-C. Never push back anything other than one read character
    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: MEM30-C. Do not access freed memory
    Page: EXP34-C. Do not dereference null pointers
    Page: FIO08-C. Take care when calling remove() on an open file
    Page: INT07-C. Use only explicitly signed or unsigned char type for numeric values
    Page: POS01-C. Check for the existence of links when dealing with files
    Page: INT09-C. Ensure enumeration constants map to unique values
    Page: STR34-C. Cast characters to unsigned char before converting to larger integer sizes
    Page: FIO37-C. Do not assume that fgets() or fgetws() returns a nonempty string when successful
    Page: INT18-C. Evaluate integer expressions in a larger size before comparing or assigning to that size
    Page: ENV02-C. Beware of multiple environment variables with the same effective name
    Page: INT14-C. Avoid performing bitwise and arithmetic operations on the same data
    Page: ERR30-C. Take care when reading errno
    Page: INT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression
    Page: FIO01-C. Be careful using functions that use file names for identification
    Page: ERR32-C. Do not rely on indeterminate values of errno
    Page: ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array
    Page: DCL11-C. Understand the type issues associated with variadic functions
    Page: EXP33-C. Do not read uninitialized memory
    Page: FIO05-C. Identify files using multiple file attributes
    Page: FIO38-C. Do not copy a FILE object
    Page: FIO34-C. Distinguish between characters read from a file and EOF or WEOF
    Page: FIO44-C. Only use values for fsetpos() that are returned from fgetpos()
    Page: MEM33-C. Allocate and copy structures containing a flexible array member dynamically
    Page: ENV33-C. Do not call system()
    Page: EXP05-C. Do not cast away a const qualification
    Page: ENV32-C. All exit handlers must return normally
    Page: MEM07-C. Ensure that the arguments to calloc(), when multiplied, do not wrap
    Page: SIG01-C. Understand implementation-specific details regarding signal handler persistence
Hierarchy
Parent Page
    Page: EE. Analyzers
Labels
Global Labels (1)
Outgoing Links
External Links (122)
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
SEI CERT C Coding Standard (1)     Page: Rose_V