summaryrefslogtreecommitdiff
path: root/src/dumm
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumm')
-rw-r--r--src/dumm/Makefile.in2
-rw-r--r--src/dumm/cowfs.c13
-rw-r--r--src/dumm/dumm.c9
3 files changed, 15 insertions, 9 deletions
diff --git a/src/dumm/Makefile.in b/src/dumm/Makefile.in
index dc1e3dc8f..276ca2ef2 100644
--- a/src/dumm/Makefile.in
+++ b/src/dumm/Makefile.in
@@ -363,6 +363,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@
@@ -385,6 +386,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/dumm/cowfs.c b/src/dumm/cowfs.c
index 28c62c217..5332ba551 100644
--- a/src/dumm/cowfs.c
+++ b/src/dumm/cowfs.c
@@ -92,11 +92,12 @@ static void overlay_destroy(overlay_t *this)
free(this);
}
-/**
- * compare two overlays by path
- */
-static bool overlay_equals(overlay_t *this, overlay_t *other)
+CALLBACK(overlay_equals, bool,
+ overlay_t *this, va_list args)
{
+ overlay_t *other;
+
+ VA_ARGS_VGET(args, other);
return streq(this->path, other->path);
}
@@ -108,8 +109,8 @@ static bool overlay_remove(private_cowfs_t *this, char *path)
{
overlay_t over, *current;
over.path = path;
- if (this->overlays->find_first(this->overlays,
- (linked_list_match_t)overlay_equals, (void**)&current, &over) != SUCCESS)
+ if (!this->overlays->find_first(this->overlays, overlay_equals,
+ (void**)&current, &over))
{
return FALSE;
}
diff --git a/src/dumm/dumm.c b/src/dumm/dumm.c
index cc4f5a16b..d147b2df0 100644
--- a/src/dumm/dumm.c
+++ b/src/dumm/dumm.c
@@ -267,10 +267,12 @@ typedef struct {
} template_enumerator_t;
METHOD(enumerator_t, template_enumerate, bool,
- template_enumerator_t *this, char **template)
+ template_enumerator_t *this, va_list args)
{
struct stat st;
- char *rel;
+ char *rel, **template;
+
+ VA_ARGS_VGET(args, template);
while (this->inner->enumerate(this->inner, &rel, NULL, &st))
{
@@ -296,7 +298,8 @@ METHOD(dumm_t, create_template_enumerator, enumerator_t*,
template_enumerator_t *enumerator;
INIT(enumerator,
.public = {
- .enumerate = (void*)_template_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _template_enumerate,
.destroy = (void*)_template_enumerator_destroy,
},
.inner = enumerator_create_directory(TEMPLATE_DIR),