National Institute of Standards and Technology
Package illustrating a test case

Test case 153326

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: SOCKET
- Data Type: UNION
- Data Flow: ADDRESS_AS_LINEAR_EXPRESSION
- Control Flow: POINTER_TO_FUNCTION

Flaws

Test Suites

Documentation

Have any comments on this test case? Please, send us an email.