assist-project/dtls-fuzzer

Reparsing leads to duplication of certain arguments

Closed this issue · 0 comments

DTLS-Fuzzer supports placeholder variables, adjusted via -D, which can be used to form 'configurable' arguments. One common example is the 'fuzzer.dir' and 'sut.port' placeholder variable, used throughout DTLS-Fuzzer's argument files. Below is how they are used to form the 'command' argument for Eclipse TinyDTLS servers.

-cmd "${fuzzer.dir}/suts/ctinydtls/tests/dtls-server -p ${sut.port}"

Placeholder variables take default values as configured in 'src/main/resources/dtls-fuzzer.properties', and can be set via '-D' to custom values. To support the latter case, DTLS-Fuzzer reparses the arguments according to the custom variable setting. Unfortunately, this reparsing can result in duplication of certain arguments (due to improper reset of argument-holding instances prior to reparsing).

For example, it can result in:

Equivalence Algorithms: [RANDOM_WP_METHOD, WP_METHOD, RANDOM_WP_METHOD, WP_METHOD]