Fix segfault

This commit is contained in:
Damien Miller 1999-11-20 17:02:56 +11:00
parent c6398efcba
commit f58db38f8d
2 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@
<marc.fournier@acadiau.ca>
- 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 <chip@valinux.com>

View File

@ -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)