Skip to content

Commit

Permalink
Enable fuzz to run on non-x86_64 platforms & fix fuzz warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed May 7, 2024
1 parent 913b89d commit 129a195
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ add_compile_definitions(TEST)
add_definitions("-DIO_SEPROXYHAL_BUFFER_SIZE_B=128") # cmake -DIO_SEPROXYHAL_BUFFER_SIZE_B=128
add_definitions("-DTARGET_NANOS=1")

add_library(bsd STATIC IMPORTED)
set_property(TARGET bsd PROPERTY IMPORTED_LOCATION /lib/x86_64-linux-gnu/libbsd.a)

include_directories(../libstellar/include)
include_directories(${BOLOS_SDK}/lib_standard_app)

Expand Down
2 changes: 1 addition & 1 deletion libstellar/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#include <stdint.h>
#include <stdbool.h>

bool base64_encode(const uint8_t *data, size_t in_len, char *out, size_t out_len);
bool base64_encode(const uint8_t *data, size_t in_len, char *out, size_t out_len);
4 changes: 2 additions & 2 deletions libstellar/formatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ static uint8_t get_data_count(formatter_data_t *fdata) {
return op_cnt + 1;
}

void reset_formatter() {
void reset_formatter(void) {
explicit_bzero(formatter_stack, sizeof(formatter_stack));
formatter_index = 0;
current_data_index = 0;
Expand Down Expand Up @@ -2563,4 +2563,4 @@ bool get_next_data(formatter_data_t *fdata, bool forward, bool *data_exists, boo
}

return true;
}
}
2 changes: 1 addition & 1 deletion libstellar/include/stellar/formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct {
/**
* Reset the formatter state.
*/
void reset_formatter();
void reset_formatter(void);

/**
* Get the next data to display.
Expand Down
2 changes: 1 addition & 1 deletion libstellar/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,4 +1513,4 @@ bool parse_soroban_authorization_envelope(const uint8_t *data,
// envelope->soroban_authorization.sub_invocation_positions[i]);
// }
return true;
}
}
2 changes: 1 addition & 1 deletion libstellar/printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,4 +936,4 @@ bool print_scv_string(const scv_string_t *scv_string, char *out, size_t out_len)
}

return true;
}
}

0 comments on commit 129a195

Please sign in to comment.