From f58db38f8d396ee5ea42975d9409a644e01cede8 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 20 Nov 1999 17:02:56 +1100 Subject: Fix segfault --- ChangeLog | 2 ++ ssh-keygen.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0bf1a5575..69a477ec7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ - Wrote autoconf tests for integer bit-types - Fixed enabling kerberos support + - Fix segfault in ssh-keygen caused by buffer overrun in filename + handling. 19991119 - Merged PAM buffer overrun patch from Chip Salzenberg 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. */ #include "includes.h" -RCSID("$Id: ssh-keygen.c,v 1.5 1999/11/17 06:29:08 damien Exp $"); +RCSID("$Id: ssh-keygen.c,v 1.6 1999/11/20 06:02:56 damien Exp $"); #include "rsa.h" #include "ssh.h" @@ -570,6 +570,7 @@ main(int ac, char **av) /* Save the public key in text format in a file with the same name but .pub appended. */ + file = xrealloc(file, strlen(file) + 5); strcat(file, ".pub"); f = fopen(file, "w"); if (!f) -- cgit v1.2.3