Skip to content

Commit

Permalink
Merge pull request #115 from Zondax/fix-audit
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Nov 2, 2023
2 parents 52dfdea + 3dc2b88 commit 7f80d18
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions app/ui/view_nano_inspect.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ void view_inspect_init(viewfunc_getInnerItem_t view_funcGetInnerItem,
}

bool h_paging_inspect_go_to_root_screen() {
return (viewdata.innerField.level >= 0) &&
(viewdata.innerField.paging.itemIdx == 0)
return (viewdata.innerField.paging.itemIdx == 0)
&& (viewdata.innerField.trace[0] != 0);
}

bool h_paging_inspect_back_screen() {
return (viewdata.innerField.level >= 0) &&
(viewdata.innerField.paging.itemIdx == (viewdata.innerField.paging.itemCount - 1))
return (viewdata.innerField.paging.itemIdx == (viewdata.innerField.paging.itemCount - 1))
&& (viewdata.innerField.trace[0] != 0);
}

Expand Down
2 changes: 1 addition & 1 deletion dockerized_build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ cpp_test:

.PHONY: fuzz_build
fuzz_build:
cmake -B build -DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11 -DCMAKE_BUILD_TYPE=Debug -DENABLE_FUZZING=1 -DENABLE_SANITIZERS=1 .
cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_FUZZING=1 -DENABLE_SANITIZERS=1 .
make -C build

.PHONY: fuzz
Expand Down
4 changes: 2 additions & 2 deletions include/utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ utf8_int8_t *c = utf8_null;
size_t bytes = 0;

/* Find the end of the string or stop when n is reached */
while ('\0' != src[bytes] && bytes < n) {
while (bytes < n && '\0' != src[bytes]) {
bytes++;
}

Expand All @@ -722,7 +722,7 @@ return utf8_null;
bytes = 0;

/* copy src byte-by-byte into our new utf8 string */
while ('\0' != src[bytes] && bytes < n) {
while (bytes < n && '\0' != src[bytes]) {
c[bytes] = src[bytes];
bytes++;
}
Expand Down
2 changes: 1 addition & 1 deletion include/zxversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

#define ZXLIB_MAJOR 19
#define ZXLIB_MINOR 9
#define ZXLIB_PATCH 0
#define ZXLIB_PATCH 1

0 comments on commit 7f80d18

Please sign in to comment.