]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixes to section cmp functions
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 1 Jun 2024 01:32:27 +0000 (19:32 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 8 Jun 2024 19:11:00 +0000 (15:11 -0400)
src/lib/server/section.h

index f16664fdb19d5f8b32466df8838feceff866eb6b..ac10afd2b0632f8b9b29d962ac901975a0746d04 100644 (file)
@@ -60,6 +60,10 @@ typedef struct {
 static inline int section_name2_match(section_name_t const *a, section_name_t const *b)
 {
        if ((a->name2 == CF_IDENT_ANY) || (b->name2 == CF_IDENT_ANY)) return 1;
+       if (!a->name2 || !b->name2) {
+               if (a->name2 == b->name2) return 1;
+               return 0;
+       }
 
        return (strcmp(a->name2, b->name2) == 0) ? 1 : 0;
 }
@@ -87,6 +91,8 @@ name2:
        return section_name2_match(a, b);
 }
 
+int8_t section_name_cmp(void const *one, void const *two);
+
 #ifdef __cplusplus
 }
 #endif