summaryrefslogtreecommitdiff
path: root/src/libsimaka
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-05-30 20:59:31 +0200
committerYves-Alexis Perez <corsac@corsac.net>2017-05-30 20:59:31 +0200
commitbba25e2ff6c4a193acb54560ea4417537bd2954e (patch)
tree9e074fe343f9ab6f5ce1e9c5142d9a6cf180fcda /src/libsimaka
parent05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff)
downloadvyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.tar.gz
vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.zip
New upstream version 5.5.3
Diffstat (limited to 'src/libsimaka')
-rw-r--r--src/libsimaka/Makefile.in2
-rw-r--r--src/libsimaka/simaka_message.c25
2 files changed, 17 insertions, 10 deletions
diff --git a/src/libsimaka/Makefile.in b/src/libsimaka/Makefile.in
index 6af66e324..6ecbaecaa 100644
--- a/src/libsimaka/Makefile.in
+++ b/src/libsimaka/Makefile.in
@@ -354,6 +354,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@
@@ -376,6 +377,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/libsimaka/simaka_message.c b/src/libsimaka/simaka_message.c
index 234d7ef2a..6827c1795 100644
--- a/src/libsimaka/simaka_message.c
+++ b/src/libsimaka/simaka_message.c
@@ -222,17 +222,22 @@ METHOD(simaka_message_t, get_type, eap_type_t,
return this->hdr->type;
}
-/**
- * convert attr_t to type and data enumeration
- */
-static bool attr_enum_filter(void *null, attr_t **in, simaka_attribute_t *type,
- void *dummy, chunk_t *data)
+CALLBACK(attr_enum_filter, bool,
+ void *null, enumerator_t *orig, va_list args)
{
- attr_t *attr = *in;
+ attr_t *attr;
+ simaka_attribute_t *type;
+ chunk_t *data;
- *type = attr->type;
- *data = chunk_create(attr->data, attr->len);
- return TRUE;
+ VA_ARGS_VGET(args, type, data);
+
+ if (orig->enumerate(orig, &attr))
+ {
+ *type = attr->type;
+ *data = chunk_create(attr->data, attr->len);
+ return TRUE;
+ }
+ return FALSE;
}
METHOD(simaka_message_t, create_attribute_enumerator, enumerator_t*,
@@ -240,7 +245,7 @@ METHOD(simaka_message_t, create_attribute_enumerator, enumerator_t*,
{
return enumerator_create_filter(
this->attributes->create_enumerator(this->attributes),
- (void*)attr_enum_filter, NULL, NULL);
+ attr_enum_filter, NULL, NULL);
}
METHOD(simaka_message_t, add_attribute, void,