=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/hostfile.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/ssh/hostfile.c 1999/10/03 21:50:03 1.3 +++ src/usr.bin/ssh/hostfile.c 1999/11/02 19:42:36 1.4 @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$Id: hostfile.c,v 1.3 1999/10/03 21:50:03 provos Exp $"); +RCSID("$Id: hostfile.c,v 1.4 1999/11/02 19:42:36 markus Exp $"); #include "packet.h" #include "ssh.h" @@ -265,11 +265,19 @@ /* Print the host name and key to the file. */ fprintf(f, "%s %u ", host, bits); buf = BN_bn2dec(e); - assert(buf != NULL); + if (buf == NULL) { + error("add_host_to_hostfile: BN_bn2dec #1 failed"); + fclose(f); + return 0; + } fprintf(f, "%s ", buf); free (buf); buf = BN_bn2dec(n); - assert(buf != NULL); + if (buf == NULL) { + error("add_host_to_hostfile: BN_bn2dec #2 failed"); + fclose(f); + return 0; + } fprintf(f, "%s\n", buf); free (buf);