diff options
author | 1999-11-02 19:42:34 +0000 | |
---|---|---|
committer | 1999-11-02 19:42:34 +0000 | |
commit | efe9f7905a9c6e3231136b24deddc7edb7b747c7 (patch) | |
tree | 45920a0a6723da34bb42b77b623cbd3f6c5f6b98 /usr.bin/ssh/ssh-add.c | |
parent | remove unused argument. ok dugsong (diff) | |
download | wireguard-openbsd-efe9f7905a9c6e3231136b24deddc7edb7b747c7.tar.xz wireguard-openbsd-efe9f7905a9c6e3231136b24deddc7edb7b747c7.zip |
replace assert() with error, fatal or packet_disconnect
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 5c314e97eb8..7ac8b98b32b 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity. */ #include "includes.h" -RCSID("$Id: ssh-add.c,v 1.7 1999/10/27 23:35:32 markus Exp $"); +RCSID("$Id: ssh-add.c,v 1.8 1999/11/02 19:42:36 markus Exp $"); #include "rsa.h" #include "ssh.h" @@ -131,13 +131,19 @@ list_identities(AuthenticationConnection *ac) had_identities = 1; printf("%d ", bits); buf = BN_bn2dec(e); - assert(buf != NULL); - printf("%s ", buf); - free (buf); + if (buf != NULL) { + printf("%s ", buf); + free (buf); + } else { + error("list_identities: BN_bn2dec #1 failed."); + } buf = BN_bn2dec(n); - assert(buf != NULL); - printf("%s %s\n", buf, comment); - free (buf); + if (buf != NULL) { + printf("%s %s\n", buf, comment); + free (buf); + } else { + error("list_identities: BN_bn2dec #2 failed."); + } xfree(comment); } BN_clear_free(e); |