From 4131599c450edf2276e2af9bcaff87ef62384c15 Mon Sep 17 00:00:00 2001 From: Peter Hajdu Date: Mon, 30 Jul 2018 12:47:24 +0200 Subject: [PATCH] fix null ptr check --- src/pam_python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pam_python.c b/src/pam_python.c index e01ee68..d1c34c9 100644 --- a/src/pam_python.c +++ b/src/pam_python.c @@ -2226,7 +2226,7 @@ static int load_user_module( goto error_exit; } dot = strrchr(user_module_name, '.'); - if (dot != 0 || strcmp(dot, ".py") == 0) + if ((dot != 0) && (strcmp(dot, ".py") == 0)) *dot = '\0'; *user_module = PyModule_New(user_module_name); if (*user_module == 0)