aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2003-02-16 11:28:55 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2003-02-16 11:28:55 +0000
commit83a75cff45f34d07ccff93034acb2544498d4f76 (patch)
tree9f714cc61868750c60e421783802e005668a82a1
parentf3ea2ebc1b39b7bcdd7fef801d7a1d17fa8f46ba (diff)
downloadsrc-83a75cff45f34d07ccff93034acb2544498d4f76.tar.gz
src-83a75cff45f34d07ccff93034acb2544498d4f76.zip
MFP4: guard against null pointer dereference which sshd can cause (#25271)
Notes
Notes: svn path=/vendor/openpam/dist/; revision=110989
-rw-r--r--contrib/openpam/lib/pam_vprompt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/openpam/lib/pam_vprompt.c b/contrib/openpam/lib/pam_vprompt.c
index 15fdc8176998..83262c472c14 100644
--- a/contrib/openpam/lib/pam_vprompt.c
+++ b/contrib/openpam/lib/pam_vprompt.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/pam_vprompt.c#8 $
+ * $P4: //depot/projects/openpam/lib/pam_vprompt.c#9 $
*/
#include <stdarg.h>
@@ -66,7 +66,7 @@ pam_vprompt(pam_handle_t *pamh,
r = pam_get_item(pamh, PAM_CONV, (const void **)&conv);
if (r != PAM_SUCCESS)
RETURNC(r);
- if (conv == NULL) {
+ if (conv == NULL || conv->conv == NULL) {
openpam_log(PAM_LOG_ERROR, "no conversation function");
RETURNC(PAM_SYSTEM_ERR);
}