]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only restrict attribute numbers for VSAs when processing unknown attribute strings
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Jan 2015 19:54:09 +0000 (14:54 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 2 Jan 2015 19:55:30 +0000 (14:55 -0500)
src/lib/dict.c

index d70996064c251fec5c343f6367a68ef9db1563b9..9db9062abb9561ff9b7c99121e1ee95b3d112852 100644 (file)
@@ -2924,7 +2924,7 @@ int dict_unknown_from_str(DICT_ATTR *da, char const *name)
        /*
         *      Enforce a maximum value on the attribute number.
         */
-       if (attr >= (unsigned) (1 << (dv_type << 3))) goto invalid;
+       if ((vendor > 0) && (attr >= (unsigned) (1 << (dv_type << 3)))) goto invalid;
 
        if (*p == '.') {
                if (dict_str2oid(p + 1, &attr, &vendor, 1) < 0) {