projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47b555b
)
fix octet string length check
author
Luke Howard
<lukeh@padl.com>
Fri, 8 Oct 2010 20:41:11 +0000
(22:41 +0200)
committer
Luke Howard
<lukeh@padl.com>
Fri, 8 Oct 2010 20:41:11 +0000
(22:41 +0200)
util_radius.cpp
patch
|
blob
|
history
diff --git
a/util_radius.cpp
b/util_radius.cpp
index
7beb175
..
b8f58d0
100644
(file)
--- a/
util_radius.cpp
+++ b/
util_radius.cpp
@@
-685,10
+685,14
@@
avpImport(rs_handle *rh,
break;
case PW_TYPE_STRING:
/* check enough room to NUL terminate */
- if (p[0]
>
= MAX_STRING_LEN)
+ if (p[0]
=
= MAX_STRING_LEN)
goto fail;
+ else
/* fallthrough */
default:
+ if (p[0] > MAX_STRING_LEN)
+ goto fail;
+
vp->length = (uint32_t)p[0];
memcpy(vp->vp_octets, p + 1, vp->length);