summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Balsini <balsini@google.com>2019-10-18 10:49:49 +0100
committerAlessio Balsini <balsini@google.com>2019-10-21 11:44:08 +0000
commitd0de1114a954ea10a3fe4ddbb0cd28a51794ef7d (patch)
tree4305fc466c32f2aa152c832a74543fee84ba5d84
parent32e7325c4400dd9f5fbf359c5673c2aab53a0e85 (diff)
Fix fuzzer name and sizeof(array)
The fuzzer name "dm_table_fuzzer" was too generic. Looking forward to an extension to host tests where each fuzzer name should be considered a unique identifier, change the fuzzer name to, "dm_linear_table_fuzzer". Fix also the syntax of sizeof(array) declaration. Bug: none Test: dm_linear_table_fuzzer Change-Id: Iaa0ee9a0eb1352f0c5269b07198d0a34d8fb3254 Signed-off-by: Alessio Balsini <balsini@google.com>
-rw-r--r--fs_mgr/libdm/Android.bp2
-rw-r--r--fs_mgr/libdm/dm_linear_fuzzer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/libdm/Android.bp b/fs_mgr/libdm/Android.bp
index 3ce909e93..8a924d5ed 100644
--- a/fs_mgr/libdm/Android.bp
+++ b/fs_mgr/libdm/Android.bp
@@ -81,7 +81,7 @@ cc_test {
}
cc_fuzz {
- name: "dm_table_fuzzer",
+ name: "dm_linear_table_fuzzer",
defaults: ["fs_mgr_defaults"],
srcs: [
"dm_linear_fuzzer.cpp",
diff --git a/fs_mgr/libdm/dm_linear_fuzzer.cpp b/fs_mgr/libdm/dm_linear_fuzzer.cpp
index b119635de..84629018a 100644
--- a/fs_mgr/libdm/dm_linear_fuzzer.cpp
+++ b/fs_mgr/libdm/dm_linear_fuzzer.cpp
@@ -76,7 +76,7 @@ void EXPECT_TRUE(const T& a) {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
uint64_t val[6];
- if (size != sizeof(*val)) {
+ if (size != sizeof(val)) {
return 0;
}