Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crash on Tunnel-Password attributes with zero length

  • Loading branch information...
commit 860cad9e02ba344edb0038419e415fe05a9a01f4 1 parent 56903af
@alandekok authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/lib/radius.c
View
6 src/lib/radius.c
@@ -1964,6 +1964,11 @@ int rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original,
* over-ride this one.
*/
create_pair:
+ /*
+ * Ignore VSAs that have no data.
+ */
+ if (attrlen == 0) goto next;
+
pair = rad_attr2vp(packet, original, secret,
attribute, attrlen, ptr);
if (!pair) {
@@ -1976,6 +1981,7 @@ int rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original,
*tail = pair;
tail = &pair->next;
+ next:
ptr += attrlen;
packet_length -= attrlen;
}
Please sign in to comment.
Something went wrong with that request. Please try again.