National Institute of Standards and Technology
Package illustrating a test case

Test case 66997

Description

CWE: 121 Stack Based Buffer Overflow
BadSource: Initialize data to a small buffer
GoodSource: Initialize data to a buffer large enough to hold a TwoIntsClass
Sinks:
GoodSink: Allocate a new class using placement new and a buffer that is large enough to hold the class
BadSink : Allocate a new class using placement new and a buffer that is too small
Flow Variant: 14 Control flow: if(globalFive==5) and if(globalFive!=5)

Flaws

Test Suites

Documentation

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