Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/lib/libtelnet Pull up revision 1.8 (requested by lukem in...



details:   https://anonhg.NetBSD.org/src/rev/1b7fc0d3007f
branches:  netbsd-3
changeset: 576531:1b7fc0d3007f
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Jul 09 22:57:04 2005 +0000

description:
Pull up revision 1.8 (requested by lukem in ticket #536):
check pwd != NULL

diffstat:

 lib/libtelnet/krb4encpwd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 987b03d9e925 -r 1b7fc0d3007f lib/libtelnet/krb4encpwd.c
--- a/lib/libtelnet/krb4encpwd.c        Sat Jul 09 22:56:58 2005 +0000
+++ b/lib/libtelnet/krb4encpwd.c        Sat Jul 09 22:57:04 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: krb4encpwd.c,v 1.6.2.1 2005/07/09 22:56:05 tron Exp $  */
+/*     $NetBSD: krb4encpwd.c,v 1.6.2.2 2005/07/09 22:57:04 tron Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)krb4encpwd.c       8.3 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: krb4encpwd.c,v 1.6.2.1 2005/07/09 22:56:05 tron Exp $");
+__RCSID("$NetBSD: krb4encpwd.c,v 1.6.2.2 2005/07/09 22:57:04 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -422,7 +422,7 @@
   char pwbuf[1024];
   int   passwdok_status = 0;
 
-  if (getpwnam_r(name, &pws, pwbuf, sizeof(pwbuf), &pwd) == 0)
+  if (getpwnam_r(name, &pws, pwbuf, sizeof(pwbuf), &pwd) == 0 && pwd != NULL)
     salt = pwd->pw_passwd;
   else salt = "xx";
 



Home | Main Index | Thread Index | Old Index