From: Nick Porter Date: Wed, 23 Apr 2025 12:53:32 +0000 (+0100) Subject: Handle missing name2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e5a7cb8d598021100c1da41b27b9249eb92a48b;p=thirdparty%2Ffreeradius-server.git Handle missing name2 --- diff --git a/src/modules/rlm_python/rlm_python.c b/src/modules/rlm_python/rlm_python.c index 5ebbacd556..f08823aa4a 100644 --- a/src/modules/rlm_python/rlm_python.c +++ b/src/modules/rlm_python/rlm_python.c @@ -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); }