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

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

Test Case IDCandidate155073
Bad / Good / MixedBadBad test case
AuthorIARPA STONESOUP Test and Evaluation team
Associations
Test suite: 102  
Application: 16  
Added byCharles Oliveira
LanguageJava
Type of test caseSource Code
Input string
Expected Output
Instructions
See src/build.xml.
Submission date2015-10-06
Description This test takes in a value from a taint source.
The value is truncated to an integer, and then used to generate
a random number within a range. If the converted integer value
is negative, SecureRandom.nextInt(value) will throw a
RuntimeException.

Metadata
- Base program: JTree
- Source Taint: ENVIRONMENT_VARIABLE
- Data Type: SIMPLE
- Data Flow: BASIC
- Control Flow: SEQUENCE
File(s)
Flaw

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

File Contains:
CWE-197: Numeric Truncation Error on line(s): 126, 127, 128