Skip to content

Commit

Permalink
check for malformed vendor-attribute in rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed Jan 31, 2018
1 parent 812526d commit 9851802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ int dovendorrewriterm(struct tlv *attr, uint32_t *removevendorattrs) {
uint32_t vendor;
uint8_t *subattrs;

if (!removevendorattrs)
if (!removevendorattrs || attr->l <= 4)
return 0;

memcpy(&vendor, attr->v, 4);
Expand Down

0 comments on commit 9851802

Please sign in to comment.