aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius
diff options
context:
space:
mode:
Diffstat (limited to 'src/radius')
-rw-r--r--src/radius/radius.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radius/radius.c b/src/radius/radius.c
index bd2aadd..266b29f 100644
--- a/src/radius/radius.c
+++ b/src/radius/radius.c
@@ -704,7 +704,7 @@ struct radius_msg * radius_msg_parse(const u8 *data, size_t len)
attr = (struct radius_attr_hdr *) pos;
- if (pos + attr->length > end || attr->length < sizeof(*attr))
+ if (attr->length > end - pos || attr->length < sizeof(*attr))
goto fail;
/* TODO: check that attr->length is suitable for attr->type */