Skip to content

Commit

Permalink
fuzz: improve debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Apr 30, 2024
1 parent c2b5df1 commit 202be0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/fuzz/fuzz_diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,15 @@ static int txDiff(void* rstx, htp_tx_t * ctx) {
htp_header_t *h = (htp_header_t *) htp_table_get_index(ctx->request_headers, i, NULL);
void *rsh = htp_tx_request_header_index(rstx, (size_t) i);
if (bstrDiff(htp_header_name(rsh), h->name, "header-name")) {
printf("request header %d is different\n", i);
printf("request header name %d is different\n", i);
fflush(stdout);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
abort();
#endif
return 1;
}
if (bstrDiff(htp_header_value(rsh), h->value, "header-value")) {
printf("request header %d is different\n", i);
printf("request header value %d is different\n", i);
fflush(stdout);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
abort();
Expand All @@ -382,15 +382,15 @@ static int txDiff(void* rstx, htp_tx_t * ctx) {
htp_header_t *h = (htp_header_t *) htp_table_get_index(ctx->response_headers, i, NULL);
void *rsh = htp_tx_response_header_index(rstx, (size_t) i);
if (bstrDiff(htp_header_name(rsh), h->name, "header-name")) {
printf("response header %d is different\n", i);
printf("response header name %d is different\n", i);
fflush(stdout);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
abort();
#endif
return 1;
}
if (bstrDiff(htp_header_value(rsh), h->value, "header-value")) {
printf("response header %d is different\n", i);
printf("response header value %d is different\n", i);
fflush(stdout);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
abort();
Expand Down

0 comments on commit 202be0f

Please sign in to comment.