Skip to content

Add libFuzzer targets#89

Open
k-wasniowski wants to merge 2 commits into
cisco:mainfrom
k-wasniowski:fuzzer
Open

Add libFuzzer targets#89
k-wasniowski wants to merge 2 commits into
cisco:mainfrom
k-wasniowski:fuzzer

Conversation

@k-wasniowski
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@bifurcation bifurcation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple minor things, overall LGTM

Comment thread fuzz/fuzz_unprotect.cpp Outdated
auto ciphertext = input_bytes(data + 1, size - 1);

CipherSuite suite;
switch (suite_selector) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it would be simpler just to cast the suite_selector to CipherSuite? Or suite_selector + 1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread fuzz/fuzz_unprotect.cpp Outdated
auto plaintext_buf = std::vector<uint8_t>(size);
auto pt_out = output_bytes(plaintext_buf);

(void)ctx.unprotect(pt_out, ciphertext, {});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike this void cast idiom. It looks like the more modern idiomatic way would be:

Suggested change
(void)ctx.unprotect(pt_out, ciphertext, {});
std::ignore = ctx.unprotect(pt_out, ciphertext, {});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@k-wasniowski k-wasniowski requested a review from bifurcation May 14, 2026 08:32
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