From 1e5a7cb8d598021100c1da41b27b9249eb92a48b Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Wed, 23 Apr 2025 13:53:32 +0100 Subject: [PATCH] Handle missing name2 --- src/modules/rlm_python/rlm_python.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.47.3