]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Handle missing name2
authorNick Porter <nick@portercomputing.co.uk>
Wed, 23 Apr 2025 12:53:32 +0000 (13:53 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 23 Apr 2025 12:54:17 +0000 (13:54 +0100)
src/modules/rlm_python/rlm_python.c

index 5ebbacd556f02878124c38e5eb0a7a1276df1e50..f08823aa4a80e0598dc9f0c4239f458e9f10c9e3 100644 (file)
@@ -416,6 +416,8 @@ static int8_t python_func_def_cmp(void const *one, void const *two)
 
        ret = strcmp(a->name1, b->name1);
        if (ret != 0) return CMP(ret, 0);
+       if (!a->name2 && !b->name2) return 0;
+       if (!a->name2 || !b->name2) return a->name2 ? 1 : -1;
        ret = strcmp(a->name2, b->name2);
        return CMP(ret, 0);
 }