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)