diff --git a/ChangeLog b/ChangeLog index 9027d6b35..a258cc897 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ - (bal) Updated contrib/cygwin/ patch by vinschen@redhat.com - (bal) minor correction to utimes() replacement. Patch by onoe@sm.sony.co.jp + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2002/06/27 08:49:44 + [dh.c ssh-keyscan.c sshconnect.c] + more checks for NULL pointers; from grendel@zeitbombe.org; ok deraadt@ 20020702 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc & @@ -1210,4 +1214,4 @@ - (stevesk) entropy.c: typo in debug message - (djm) ssh-keygen -i needs seeded RNG; report from markus@ -$Id: ChangeLog,v 1.2315 2002/07/03 23:50:00 mouring Exp $ +$Id: ChangeLog,v 1.2316 2002/07/04 00:03:56 mouring Exp $ diff --git a/dh.c b/dh.c index 33187e028..6ec37867a 100644 --- a/dh.c +++ b/dh.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: dh.c,v 1.21 2002/03/06 00:23:27 markus Exp $"); +RCSID("$OpenBSD: dh.c,v 1.22 2002/06/27 08:49:44 markus Exp $"); #include "xmalloc.h" @@ -50,7 +50,7 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg) /* Ignore leading whitespace */ if (*arg == '\0') arg = strdelim(&cp); - if (!*arg || *arg == '#') + if (!arg || !*arg || *arg == '#') return 0; /* time */ diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 333a38e34..d9bbb91f8 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.36 2002/06/16 21:30:58 itojun Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.37 2002/06/27 08:49:44 markus Exp $"); #include "openbsd-compat/fake-queue.h" @@ -116,7 +116,8 @@ Linebuf_alloc(const char *filename, void (*errfun) (const char *,...)) if (!(lb = malloc(sizeof(*lb)))) { if (errfun) - (*errfun) ("linebuf (%s): malloc failed\n", lb->filename); + (*errfun) ("linebuf (%s): malloc failed\n", + filename ? filename : "(stdin)"); return (NULL); } if (filename) { diff --git a/sshconnect.c b/sshconnect.c index b89321fb8..32e57296e 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.126 2002/06/23 03:30:17 deraadt Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.127 2002/06/27 08:49:44 markus Exp $"); #include @@ -476,7 +476,7 @@ confirm(const char *prompt) (p[0] == '\0') || (p[0] == '\n') || strncasecmp(p, "no", 2) == 0) ret = 0; - if (strncasecmp(p, "yes", 3) == 0) + if (p && strncasecmp(p, "yes", 3) == 0) ret = 1; if (p) xfree(p);