summaryrefslogtreecommitdiff
path: root/src/libradius
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/libradius
parent05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff)
downloadvyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.tar.gz
vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.zip
New upstream version 5.5.3
Diffstat (limited to 'src/libradius')
-rw-r--r--src/libradius/Makefile.in2
-rw-r--r--src/libradius/radius_message.c20
2 files changed, 16 insertions, 6 deletions
diff --git a/src/libradius/Makefile.in b/src/libradius/Makefile.in
index 8f91275c7..9e7b7372b 100644
--- a/src/libradius/Makefile.in
+++ b/src/libradius/Makefile.in
@@ -351,6 +351,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@
@@ -373,6 +374,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/libradius/radius_message.c b/src/libradius/radius_message.c
index 9705d3b53..51135fbea 100644
--- a/src/libradius/radius_message.c
+++ b/src/libradius/radius_message.c
@@ -244,8 +244,12 @@ typedef struct {
} attribute_enumerator_t;
METHOD(enumerator_t, attribute_enumerate, bool,
- attribute_enumerator_t *this, int *type, chunk_t *data)
+ attribute_enumerator_t *this, va_list args)
{
+ chunk_t *data;
+ int *type;
+
+ VA_ARGS_VGET(args, type, data);
if (this->left == 0)
{
return FALSE;
@@ -275,7 +279,8 @@ METHOD(radius_message_t, create_enumerator, enumerator_t*,
}
INIT(e,
.public = {
- .enumerate = (void*)_attribute_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _attribute_enumerate,
.destroy = (void*)free,
},
.next = (rattr_t*)this->msg->attributes,
@@ -299,12 +304,14 @@ typedef struct {
} vendor_enumerator_t;
METHOD(enumerator_t, vendor_enumerate, bool,
- vendor_enumerator_t *this, int *vendor, int *type, chunk_t *data)
+ vendor_enumerator_t *this, va_list args)
{
- chunk_t inner_data;
- int inner_type;
+ chunk_t inner_data, *data;
+ int inner_type, *vendor, *type;
uint8_t type8, len;
+ VA_ARGS_VGET(args, vendor, type, data);
+
while (TRUE)
{
if (this->reader)
@@ -354,7 +361,8 @@ METHOD(radius_message_t, create_vendor_enumerator, enumerator_t*,
INIT(e,
.public = {
- .enumerate = (void*)_vendor_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _vendor_enumerate,
.destroy = _vendor_destroy,
},
.inner = create_enumerator(this),