This test case includes the entire suite of code examples provided by DRDC. It contains a main function so that the tests can be executed. Please see the included readme.txt for instructions on preprocessor definitions to make the suite work as desired.
These test cases were graciously provided by Frederic Michaud of Defense Research & Development Canada - Valcartier.
- CWE-124 Buffer Underwrite ('Buffer Underflow')
- CWE-134 Use of Externally-Controlled Format String
- CWE-190 Integer Overflow or Wraparound
- CWE-369 Divide By Zero
- CWE-590 Free of Memory not on the Heap
- CWE-401 Missing Release of Memory after Effective Lifetime
- CWE-416 Use After Free
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
- CWE-476 NULL Pointer Dereference
- CWE-415 Double Free
- CWE-170 Improper Null Termination
- CWE-126 Buffer Over-read
- CWE-457 Use of Uninitialized Variable
- CWE-467 Use of sizeof() on a Pointer Type
- CWE-665 Improper Initialization
- CWE-681 Incorrect Conversion between Numeric Types
- CWE-562 Return of Stack Variable Address
- CWE-466 Return of Pointer Value Outside of Expected Range
- CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
- CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
- CWE-822 Untrusted Pointer Dereference
Have any comments on this test case? Please, send us an email.