]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CID 720453: Don't cast, so we restrict the range of values to the minimum and maximum...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 13:26:51 +0000 (09:26 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 13:28:49 +0000 (09:28 -0400)
Hopefully coverity is smart enough to figure that out... Otherwise I guess we're checking the that uint8_t can't be bigger than UINT8_MAX :/

src/lib/util/pair.c

index 0b87f0a85e0123e757c3843b260673a3a3d77acc..71fee115ac8cc006f76d36e99d7183b74726e562 100644 (file)
@@ -2532,7 +2532,7 @@ FR_TOKEN fr_pair_raw_from_str(char const **ptr, VALUE_PAIR_RAW *raw)
                 *      out which operators come after the attribute
                 *      name.  Yes, our "lexer" is bad.
                 */
-               if (!fr_dict_attr_allowed_chars[(unsigned int) *t]) {
+               if (!fr_dict_attr_allowed_chars[*t]) {
                        break;
                }