use MAX_RADIUS_ATTRIBUTE_SIZE constant
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 13 Mar 2012 17:06:56 +0000 (18:06 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 13 Mar 2012 17:06:56 +0000 (18:06 +0100)
src/libradius/radius_message.c

index 03be5a2..ce8903c 100644 (file)
@@ -268,7 +268,7 @@ METHOD(radius_message_t, add, void,
 {
        rattr_t *attribute;
 
-       data.len = min(data.len, 253);
+       data.len = min(data.len, MAX_RADIUS_ATTRIBUTE_SIZE);
        this->msg = realloc(this->msg,
                                                ntohs(this->msg->length) + sizeof(rattr_t) + data.len);
        attribute = ((void*)this->msg) + ntohs(this->msg->length);