diff options
Diffstat (limited to 'src/libimcv/plugins/imv_attestation')
-rw-r--r-- | src/libimcv/plugins/imv_attestation/Makefile.in | 2 | ||||
-rw-r--r-- | src/libimcv/plugins/imv_attestation/imv_attestation_state.c | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/src/libimcv/plugins/imv_attestation/Makefile.in b/src/libimcv/plugins/imv_attestation/Makefile.in index 9782757e0..02bd5f510 100644 --- a/src/libimcv/plugins/imv_attestation/Makefile.in +++ b/src/libimcv/plugins/imv_attestation/Makefile.in @@ -367,6 +367,7 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fips_mode = @fips_mode@ +fuzz_plugins = @fuzz_plugins@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ host = @host@ @@ -389,6 +390,7 @@ json_CFLAGS = @json_CFLAGS@ json_LIBS = @json_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ +libfuzzer = @libfuzzer@ libiptc_CFLAGS = @libiptc_CFLAGS@ libiptc_LIBS = @libiptc_LIBS@ linux_headers = @linux_headers@ diff --git a/src/libimcv/plugins/imv_attestation/imv_attestation_state.c b/src/libimcv/plugins/imv_attestation/imv_attestation_state.c index 1c3b91aeb..d63940797 100644 --- a/src/libimcv/plugins/imv_attestation/imv_attestation_state.c +++ b/src/libimcv/plugins/imv_attestation/imv_attestation_state.c @@ -418,24 +418,24 @@ METHOD(imv_attestation_state_t, create_component, pts_component_t*, } } -/** - * Enumerate file measurement entries - */ -static bool entry_filter(void *null, func_comp_t **entry, uint8_t *flags, - void *i2, uint32_t *depth, - void *i3, pts_comp_func_name_t **comp_name) +CALLBACK(entry_filter, bool, + void *null, enumerator_t *orig, va_list args) { - pts_component_t *comp; - pts_comp_func_name_t *name; - - comp = (*entry)->comp; - name = (*entry)->name; + func_comp_t *entry; + pts_comp_func_name_t **comp_name; + uint32_t *depth; + uint8_t *flags; - *flags = comp->get_evidence_flags(comp); - *depth = comp->get_depth(comp); - *comp_name = name; + VA_ARGS_VGET(args, flags, depth, comp_name); - return TRUE; + if (orig->enumerate(orig, &entry)) + { + *flags = entry->comp->get_evidence_flags(entry->comp); + *depth = entry->comp->get_depth(entry->comp); + *comp_name = entry->name; + return TRUE; + } + return FALSE; } METHOD(imv_attestation_state_t, create_component_enumerator, enumerator_t*, @@ -443,7 +443,7 @@ METHOD(imv_attestation_state_t, create_component_enumerator, enumerator_t*, { return enumerator_create_filter( this->components->create_enumerator(this->components), - (void*)entry_filter, NULL, NULL); + entry_filter, NULL, NULL); } METHOD(imv_attestation_state_t, get_component, pts_component_t*, |