summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-20 17:02:56 +1100
committerDamien Miller <djm@mindrot.org>1999-11-20 17:02:56 +1100
commitf58db38f8d396ee5ea42975d9409a644e01cede8 (patch)
tree37595c5a2ab8e177eb079f8316b9dc1fdbc85690
parentc6398efcbaa2c8fea00420940fcf99b183ff24e9 (diff)
Fix segfault
-rw-r--r--ChangeLog2
-rw-r--r--ssh-keygen.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0bf1a5575..69a477ec7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
3 <marc.fournier@acadiau.ca> 3 <marc.fournier@acadiau.ca>
4 - Wrote autoconf tests for integer bit-types 4 - Wrote autoconf tests for integer bit-types
5 - Fixed enabling kerberos support 5 - Fixed enabling kerberos support
6 - Fix segfault in ssh-keygen caused by buffer overrun in filename
7 handling.
6 8
719991119 919991119
8 - Merged PAM buffer overrun patch from Chip Salzenberg <chip@valinux.com> 10 - Merged PAM buffer overrun patch from Chip Salzenberg <chip@valinux.com>
diff --git a/ssh-keygen.c b/ssh-keygen.c
index deb08dd96..21b61b44b 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -14,7 +14,7 @@ Identity and host key generation and maintenance.
14*/ 14*/
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: ssh-keygen.c,v 1.5 1999/11/17 06:29:08 damien Exp $"); 17RCSID("$Id: ssh-keygen.c,v 1.6 1999/11/20 06:02:56 damien Exp $");
18 18
19#include "rsa.h" 19#include "rsa.h"
20#include "ssh.h" 20#include "ssh.h"
@@ -570,6 +570,7 @@ main(int ac, char **av)
570 570
571 /* Save the public key in text format in a file with the same name but 571 /* Save the public key in text format in a file with the same name but
572 .pub appended. */ 572 .pub appended. */
573 file = xrealloc(file, strlen(file) + 5);
573 strcat(file, ".pub"); 574 strcat(file, ".pub");
574 f = fopen(file, "w"); 575 f = fopen(file, "w");
575 if (!f) 576 if (!f)