Back to the previous page
Test Case ID | ![]() |
Bad / Good / Mixed | Bad![]() |
Author | IARPA STONESOUP Test and Evaluation team |
Associations | Test suite: 102 Application: 18 |
Added by | Charles Oliveira |
Language | C |
Type of test case | Source Code |
Input string | |
Expected Output | |
Instructions | See src/INSTALL file for instructions on how to install. |
Submission date | 2015-10-06 |
Description | This test case allocates a buffer on the heap, copies the input string into it, and then capitalizes each letter in the buffer. It searches that buffer to see if it contains the letter 'E', using a while loop that increments the pointer to the buffer each time through the loop. When it finds a letter 'E', or reaches the end of the buffer, it frees the buffer, using the pointer that it may have incremented. If the input is the empty string, or has the letter 'E' (or 'e') as its first character, the free happens successfully. If the input is non-empty and does not have the letter 'E' as its first character, the free does not happen at the start of the buffer, resulting in a segfault. Metadata - Base program: Gimp - Source Taint: SHARED_MEMORY - Data Type: HEAP_POINTER - Data Flow: BUFFER_ADDRESS_POINTER - Control Flow: INTERPROCEDURAL_10 |
File(s) |
|
Flaw |
There are no comments
Have any comments on this test case? Please,
.
- tile.c
- C-C761A-GIMP-07-ST04-DT04-DF17-CF14-01.yaml
- service_mon.sh
- shm_setup.c
- runFifos.py
- C-C761A-GIMP-07-ST04-DT04-DF17-CF14-01.xml
File Contains:
CWE-761: Free of Pointer not at Start of Buffer on line(s): 144, 145, 146
CWE-761: Free of Pointer not at Start of Buffer on line(s): 144, 145, 146