nsswitch: fix crash on null pam change pw response
[samba.git] / nsswitch / pam_winbind.c
index 81055c9f0ff9461ce30cc4cb420f9b72937ee5d2..fdaf8074fcf6a6caf648f49b755e6b7d6723d7ff 100644 (file)
@@ -831,7 +831,7 @@ static bool _pam_winbind_change_pwd(struct pwb_context *ctx)
        }
        _pam_log(ctx, LOG_CRIT, "Received [%s] reply from application.\n", resp->resp);
 
-       if (strcasecmp(resp->resp, "yes") == 0) {
+       if ((resp->resp != NULL) && (strcasecmp(resp->resp, "yes") == 0)) {
                retval = true;
        }