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

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

Test Case IDAccepted252040
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: min Set data to the max value for short
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: 52 Data flow: data passed as an argument from one method to another to another in three 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