Skip to content

Commit

Permalink
Verify that the refcounter has a correct value after command run.
Browse files Browse the repository at this point in the history
Disable debug.
  • Loading branch information
sobomax committed Sep 10, 2024
1 parent 52a68bc commit e8b69f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/fuzz/fuzz_command_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ LLVMFuzzerTestOneInput(const char *data, size_t size)

do {
chunk = rfz_get_chunk(chunk.rem_data, chunk.rem_size);
ExecuteRTPPCommand(&gconf, chunk.data, chunk.size, 1);
ExecuteRTPPCommand(&gconf, chunk.data, chunk.size, 0);
} while (chunk.rem_size > 1);
assert(ExecuteRTPPCommand(&gconf, "X", 1, 1) == 0);
assert(ExecuteRTPPCommand(&gconf, "X", 1, 0) == 0);
return (0);
}
1 change: 1 addition & 0 deletions scripts/fuzz/rfz_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ ExecuteRTPPCommand(struct rtpp_conf *gcp, const char *data, size_t size, int deb
}
assert(tp == cmd->reply);
assert(trp == cmd->reply->rcnt);
assert(CALL_SMETHOD(cmd->reply->rcnt, peek) == 1);
free_command(cmd);
return (rval);
}

0 comments on commit e8b69f1

Please sign in to comment.