projects
/
mech_eap.orig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9fe4c1d
)
util_radius: radius only permits 253 octets
author
Sam Hartman
<hartmans@painless-security.com>
Fri, 11 Mar 2011 19:53:22 +0000
(14:53 -0500)
committer
Sam Hartman
<hartmans@painless-security.com>
Fri, 11 Mar 2011 19:53:22 +0000
(14:53 -0500)
There is an off by one error because MAX_STR_LEN from freeradius has a pad byte.
Only store 253 bytes of AVP at a time.
util_radius.cpp
patch
|
blob
|
history
diff --git
a/util_radius.cpp
b/util_radius.cpp
index
537150d
..
a680741
100644
(file)
--- a/
util_radius.cpp
+++ b/
util_radius.cpp
@@
-479,8
+479,10
@@
gssEapRadiusAddAvp(OM_uint32 *minor,
VALUE_PAIR *vp;
size_t n = remain;
- if (n > MAX_STRING_LEN)
- n = MAX_STRING_LEN;
+ /*There's an extra byte of padding; RADIUS AVPS can only
+ * be 253 octets*/
+ if (n > MAX_STRING_LEN-1)
+ n = MAX_STRING_LEN-1;
vp = paircreate(attrid, PW_TYPE_OCTETS);
if (vp == NULL) {