Skip to content

Commit da36d8d

Browse files
committed
renamed automotive example to state example
1 parent 823df83 commit da36d8d

17 files changed

+6
-34
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ find_package(cifuzz NO_SYSTEM_ENVIRONMENT_PATH)
1818
enable_fuzz_testing()
1919

2020
add_subdirectory(src/simple_examples)
21-
add_subdirectory(src/automotive)
21+
add_subdirectory(src/state_example)
2222
add_subdirectory(src/advanced_examples)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
add_library(automotive
1+
add_library(state
22
crypto/crypto_1.c
33
crypto/crypto_2.c
44
gps/gps_1.c
55
key_management/key_management_1.c
66
time/time_1.c
77
)
88

9-
target_include_directories(automotive PUBLIC
9+
target_include_directories(state PUBLIC
1010
${CMAKE_CURRENT_SOURCE_DIR}/crypto
1111
${CMAKE_CURRENT_SOURCE_DIR}/gps
1212
${CMAKE_CURRENT_SOURCE_DIR}/key_management
1313
${CMAKE_CURRENT_SOURCE_DIR}/time
1414
)
1515

16-
add_fuzz_test(automotive_fuzzer
16+
add_fuzz_test(state_fuzzer
1717
fuzz_test.cpp
1818
mocks.cpp
1919
)
2020

21-
target_link_libraries(automotive_fuzzer
22-
automotive
21+
target_link_libraries(state_fuzzer
22+
state
2323
)

src/automotive/fuzz_test.cpp renamed to src/state_example/fuzz_test.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,6 @@ FUZZ_TEST(const uint8_t *data, size_t size) {
7878
sizeof(uint8_t) * GetFDP()->ConsumeIntegral<uint16_t>());
7979
const uint8_t *message = (const uint8_t *)message_vec.data();
8080

81-
// The parameter "len" seems to represent the length of a buffer/array. In
82-
// this case, we usually don't want to provide fuzzer-generated lengths
83-
// that differ from the actual length of the buffer. If you confirm that
84-
// the parameter is a length parameter, you can get the length of the
85-
// fuzzer-generated buffer as follows (replace "buffer" with the actual
86-
// variable):
87-
// int len = buffer.size();
8881
int len = message_vec.size();
8982
crypto_hmac hmac_tmp = {};
9083
ConsumeDataAndFillRestWithZeros(hmac_tmp.hmac, 64);
@@ -108,13 +101,6 @@ FUZZ_TEST(const uint8_t *data, size_t size) {
108101
sizeof(uint8_t) * GetFDP()->ConsumeIntegral<uint16_t>());
109102
const uint8_t *message = (const uint8_t *)message_vec.data();
110103

111-
// The parameter "len" seems to represent the length of a buffer/array. In
112-
// this case, we usually don't want to provide fuzzer-generated lengths
113-
// that differ from the actual length of the buffer. If you confirm that
114-
// the parameter is a length parameter, you can get the length of the
115-
// fuzzer-generated buffer as follows (replace "buffer" with the actual
116-
// variable):
117-
// int len = buffer.size();
118104
int len = message_vec.size();
119105
crypto_hmac hmac_tmp = {};
120106
ConsumeDataAndFillRestWithZeros(hmac_tmp.hmac, 64);
@@ -169,13 +155,6 @@ FUZZ_TEST(const uint8_t *data, size_t size) {
169155
sizeof(uint8_t) * GetFDP()->ConsumeIntegral<uint16_t>());
170156
uint8_t *key = (uint8_t *)key_vec.data();
171157

172-
// The parameter "length" seems to represent the length of a buffer/array.
173-
// In this case, we usually don't want to provide fuzzer-generated lengths
174-
// that differ from the actual length of the buffer. If you confirm that
175-
// the parameter is a length parameter, you can get the length of the
176-
// fuzzer-generated buffer as follows (replace "buffer" with the actual
177-
// variable):
178-
// uint8_t length = buffer.size();
179158
uint8_t length = key_vec.size();
180159

181160
key_management_create_key(key, length);
@@ -187,13 +166,6 @@ FUZZ_TEST(const uint8_t *data, size_t size) {
187166
sizeof(uint8_t) * GetFDP()->ConsumeIntegral<uint16_t>());
188167
uint8_t *nonce = (uint8_t *)nonce_vec.data();
189168

190-
// The parameter "length" seems to represent the length of a buffer/array.
191-
// In this case, we usually don't want to provide fuzzer-generated lengths
192-
// that differ from the actual length of the buffer. If you confirm that
193-
// the parameter is a length parameter, you can get the length of the
194-
// fuzzer-generated buffer as follows (replace "buffer" with the actual
195-
// variable):
196-
// uint8_t length = buffer.size();
197169
uint8_t length = nonce_vec.size();
198170

199171
key_management_create_nonce(nonce, length);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)