Back to the previous page
Test Case ID | ![]() |
Bad / Good / Mixed | Bad![]() |
Author | IARPA STONESOUP Test and Evaluation team |
Associations | Test suite: 102 Application: 11 |
Added by | Charles Oliveira |
Language | Java |
Type of test case | Source Code |
Input string | |
Expected Output | |
Instructions | See src/build.xml and src/maven-build.xml. |
Submission date | 2015-10-06 |
Description | This weakness takes an integer and string as input (int string) where the integer is the size of the array to sort for timing and the string is the data that is acted upon. The weakness spawns two threads, both of which in turn call the function 'arrFunc' which is non-reentrant. 'arrFunc' uses a static integer to iterate through the string which can lead to multiple increments of j per iteration of the for loop causing a StringIndexOutOfBoundsException if 'arrFunc' is run simultaneously by two or more threads. Metadata - Base program: Apache Jena - Source Taint: SOCKET - Data Type: SIMPLE - Data Flow: VAR_ARG_LIST - Control Flow: INFINITE_LOOP |
File(s) |
|
Flaw |
There are no comments
Have any comments on this test case? Please,
.
- LexerScheme.java
- runFifos.py
- service_mon.sh
- J-C663A-JENA-04-ST03-DT02-DF12-CF03-01.xml
- J-C663A-JENA-04-ST03-DT02-DF12-CF03-01.yaml
File Contains:
CWE-663: Use of a Non-reentrant Function in a Concurrent Context on line(s): 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925
CWE-663: Use of a Non-reentrant Function in a Concurrent Context on line(s): 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925