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

Fix fuzzer build error #60

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions fuzz/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace {
void asDict(const uint8_t *data, size_t size) {
sf_parser sfp;
sf_vec key;
sf_value val;
sfparse_parser sfp;
sfparse_vec key;
sfparse_value val;

sf_parser_init(&sfp, data, size);
sfparse_parser_init(&sfp, data, size);

for (;;) {
auto rv = sf_parser_dict(&sfp, &key, &val);
auto rv = sfparse_parser_dict(&sfp, &key, &val);
if (rv != 0) {
break;
}
Expand All @@ -19,13 +19,13 @@ void asDict(const uint8_t *data, size_t size) {

namespace {
void asList(const uint8_t *data, size_t size) {
sf_parser sfp;
sf_value val;
sfparse_parser sfp;
sfparse_value val;

sf_parser_init(&sfp, data, size);
sfparse_parser_init(&sfp, data, size);

for (;;) {
auto rv = sf_parser_list(&sfp, &val);
auto rv = sfparse_parser_list(&sfp, &val);
if (rv != 0) {
break;
}
Expand All @@ -35,17 +35,17 @@ void asList(const uint8_t *data, size_t size) {

namespace {
void asItem(const uint8_t *data, size_t size) {
sf_parser sfp;
sf_value val;
sfparse_parser sfp;
sfparse_value val;

sf_parser_init(&sfp, data, size);
sfparse_parser_init(&sfp, data, size);

auto rv = sf_parser_item(&sfp, &val);
auto rv = sfparse_parser_item(&sfp, &val);
if (rv != 0) {
return;
}

sf_parser_item(&sfp, &val);
sfparse_parser_item(&sfp, &val);
}
} // namespace

Expand Down
Loading