summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:03:56 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:03:56 +0000
commit04f9af7dfcac6a2230bbb574ea8ddaa5e39baa04 (patch)
tree3fe9ffee68fde9726c4626e86071fea364b61478
parent723e29aa20cdd59c12ff02c4a7d7d7f45bc07a08 (diff)
- 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@
-rw-r--r--ChangeLog6
-rw-r--r--dh.c4
-rw-r--r--ssh-keyscan.c5
-rw-r--r--sshconnect.c4
4 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9027d6b35..a258cc897 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
2 - (bal) Updated contrib/cygwin/ patch by vinschen@redhat.com 2 - (bal) Updated contrib/cygwin/ patch by vinschen@redhat.com
3 - (bal) minor correction to utimes() replacement. Patch by 3 - (bal) minor correction to utimes() replacement. Patch by
4 onoe@sm.sony.co.jp 4 onoe@sm.sony.co.jp
5 - OpenBSD CVS Sync
6 - markus@cvs.openbsd.org 2002/06/27 08:49:44
7 [dh.c ssh-keyscan.c sshconnect.c]
8 more checks for NULL pointers; from grendel@zeitbombe.org; ok deraadt@
5 9
620020702 1020020702
7 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc & 11 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
@@ -1210,4 +1214,4 @@
1210 - (stevesk) entropy.c: typo in debug message 1214 - (stevesk) entropy.c: typo in debug message
1211 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1215 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1212 1216
1213$Id: ChangeLog,v 1.2315 2002/07/03 23:50:00 mouring Exp $ 1217$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 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.21 2002/03/06 00:23:27 markus Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.22 2002/06/27 08:49:44 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -50,7 +50,7 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
50 /* Ignore leading whitespace */ 50 /* Ignore leading whitespace */
51 if (*arg == '\0') 51 if (*arg == '\0')
52 arg = strdelim(&cp); 52 arg = strdelim(&cp);
53 if (!*arg || *arg == '#') 53 if (!arg || !*arg || *arg == '#')
54 return 0; 54 return 0;
55 55
56 /* time */ 56 /* 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 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$OpenBSD: ssh-keyscan.c,v 1.36 2002/06/16 21:30:58 itojun Exp $"); 10RCSID("$OpenBSD: ssh-keyscan.c,v 1.37 2002/06/27 08:49:44 markus Exp $");
11 11
12#include "openbsd-compat/fake-queue.h" 12#include "openbsd-compat/fake-queue.h"
13 13
@@ -116,7 +116,8 @@ Linebuf_alloc(const char *filename, void (*errfun) (const char *,...))
116 116
117 if (!(lb = malloc(sizeof(*lb)))) { 117 if (!(lb = malloc(sizeof(*lb)))) {
118 if (errfun) 118 if (errfun)
119 (*errfun) ("linebuf (%s): malloc failed\n", lb->filename); 119 (*errfun) ("linebuf (%s): malloc failed\n",
120 filename ? filename : "(stdin)");
120 return (NULL); 121 return (NULL);
121 } 122 }
122 if (filename) { 123 if (filename) {
diff --git a/sshconnect.c b/sshconnect.c
index b89321fb8..32e57296e 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.126 2002/06/23 03:30:17 deraadt Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.127 2002/06/27 08:49:44 markus Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -476,7 +476,7 @@ confirm(const char *prompt)
476 (p[0] == '\0') || (p[0] == '\n') || 476 (p[0] == '\0') || (p[0] == '\n') ||
477 strncasecmp(p, "no", 2) == 0) 477 strncasecmp(p, "no", 2) == 0)
478 ret = 0; 478 ret = 0;
479 if (strncasecmp(p, "yes", 3) == 0) 479 if (p && strncasecmp(p, "yes", 3) == 0)
480 ret = 1; 480 ret = 1;
481 if (p) 481 if (p)
482 xfree(p); 482 xfree(p);