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

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

Test Case IDAccepted252084
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: 71 Data flow: data passed as an Object reference argument from one method to another in different classes 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): 28