SAMATE Logo NIST Logo The SAMATE Project Department of Homeland Security
Downloads:  Download this Test Case #252083

Back to the previous page... Back to the previous page

Test Case IDAccepted252083
Bad / Good / MixedMixedMixed test case
AuthorNSA/Center for Assured Software
Test suite: 109  
Added byCharles Oliveira
Type of test caseSource Code
Input string
Expected Output
Submission date2017-11-02
DescriptionCWE: 191 Integer Underflow
BadSource: rand Set data to result of rand()
GoodSource: A hardcoded non-zero, non-min, non-max, even number
Sinks: sub
GoodSink: Ensure there will not be an underflow before subtracting 1 from data
BadSink : Subtract 1 from data, which can cause an Underflow
Flow Variant: 68 Data flow: data passed as a member variable in the a class, which is used by a method in another class in the same package

There are no comments
Have any comments on this test case? Please, .



File Contains:
CWE-191: Integer Underflow (Wrap or Wraparound) on line(s): 29