Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Add fuzzing tests #402

Closed
wants to merge 3 commits into from
Closed

Conversation

TheBiggerGuy
Copy link
Contributor

This is a first attempt at adding a fuzzing harness to the test suite.
It uses the "American Fuzzy Lop" (AFL) fuzzer and only requires a small harness to test a TCP ModBus server.

I am seeking comments on what people think about adding a fuzzer to the test suite?

Change          int modbus_get_header_length(modbus_t *ctx)
to     unsigned int modbus_get_header_length(modbus_t *ctx)

The result of modbus_get_header_length can never be negative and seems
to be on signed due to a internal use of -1 in some places outside the
public API

This commit also follows the minimum number of signed -> unsigned
changes without control flow changes.
This is a first attempt at adding a fuzzing harness to the test suite.
It uses the "American Fuzzy Lop" (AFL) fuzzer and only requires a small
harness to test a TCP ModBus server.
This enables the faster "clang-fast" compiler as well as better resting
server state between runs.
@stephane
Copy link
Owner

Closed by 96c06aa (in CI).
Thank you.
Other changes (unsigned int) are already included.

@stephane stephane closed this Nov 28, 2022
epsilonrt pushed a commit to epsilonrt/libmodbus that referenced this pull request Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants