]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixed string copying in sub variable.
authorAlan T. DeKok <aland@freeradius.org>
Wed, 2 Dec 2009 07:51:27 +0000 (08:51 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 2 Dec 2009 07:52:41 +0000 (08:52 +0100)
Apparently the only reason this worked before is that no one used it.
The decode_attribute() function did the string copying itself,
and therefore avoided this.

src/main/util.c

index 7bd0c7cece5956f13d170b17b46520bb7a9a7784..a18add7b799d20621953cfc43daf8dc10e34825f 100644 (file)
@@ -550,6 +550,7 @@ int rad_copy_variable(char *to, const char *from)
                        if (sublen < 0) return sublen;
                        from += sublen;
                        to += sublen;
+                       length += sublen;
                        break;
 
                case '}':       /* end of variable expansion */