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 53f6572..db6580f 100644 (file)
@@ -2144,6 +2144,11 @@ int paircmp(VALUE_PAIR *one, VALUE_PAIR *two)
        }
 
        /*
+        *      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.
         */