Skip to content

Commit

Permalink
* radsecproxy.c (extractattr): Bug! When s is changed, update len. Th…
Browse files Browse the repository at this point in the history
…is might actually work now!
  • Loading branch information
Linus Nordberg committed May 25, 2010
1 parent 2e9d382 commit 684ade5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2335,19 +2335,20 @@ struct tlv *extractattr(char *nameval) {
struct tlv *a;

s = strchr(nameval, ':');
name = atoi(nameval);
if (!s)
return NULL;
len = strlen(s + 1);
if (len > 253)
return NULL;
name = atoi(nameval);

/* Two ':' means that we have vendor:name:val. */
s2 = strchr(s + 1, ':');
if (s2) { /* Two ':' means we have vendor:name:val. */
if (s2) {
vendor = name;
name = atoi(s + 1);
s = s2;
}
len = strlen(s + 1);
if (len > 253)
return NULL;

if (name < 1 || name > 255)
return NULL;
Expand Down

0 comments on commit 684ade5

Please sign in to comment.