National Institute of Standards and Technology
Package illustrating a test case

Test case 82095

Description

CWE: 188 Reliance on Data Memory Layout
Sinks: union
GoodSink: Use mechanisms that are not dependent upon size, alignment/packing, or byte order to accomplish equivalent functionality
BadSink : Modify a union member by relying on the byte-order, size, alignment/packing of struct and union fields
Flow Variant: 04 Control flow: if(STATIC_CONST_TRUE) and if(STATIC_CONST_FALSE)

Flaws

Test Suites

Documentation

Have any comments on this test case? Please, send us an email.