]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Can't compare pairs of two different types
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Dec 2012 11:54:56 +0000 (06:54 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Dec 2012 11:54:56 +0000 (06:54 -0500)
src/lib/valuepair.c

index 53f65725073790a1ade6a10dc86f015694a8c7c8..db6580fd3edf6e9ff0b8676cc19dc602189efc9e 100644 (file)
@@ -2143,6 +2143,11 @@ int paircmp(VALUE_PAIR *one, VALUE_PAIR *two)
                break;
        }
 
+       /*
+        *      Can't compare two attributes of differing types
+        */
+       if (one->type != two->type) return one->type - two->type;
+
        /*
         *      After doing the previous check for special comparisons,
         *      do the per-type comparison here.