Assert that comp < count, not <= count
authorAlan T. DeKok <aland@freeradius.org>
Mon, 1 Dec 2008 09:37:21 +0000 (10:37 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 1 Dec 2008 16:47:24 +0000 (17:47 +0100)
This fixes Coverity #72

src/main/modules.c

index be71b72..91215e9 100644 (file)
@@ -558,7 +558,7 @@ static int load_subcomponent_section(modcallable *parent, CONF_SECTION *cs,
        const char *name2 = cf_section_name2(cs);
 
        rad_assert(comp >= RLM_COMPONENT_AUTH);
-       rad_assert(comp <= RLM_COMPONENT_COUNT);
+       rad_assert(comp < RLM_COMPONENT_COUNT);
 
        /*
         *      Sanity check.