=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/dh.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- src/usr.bin/ssh/dh.c 2006/11/07 13:02:07 1.44 +++ src/usr.bin/ssh/dh.c 2007/09/27 00:15:57 1.45 @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.44 2006/11/07 13:02:07 markus Exp $ */ +/* $OpenBSD: dh.c,v 1.45 2007/09/27 00:15:57 ray Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -182,7 +182,7 @@ BIGNUM *tmp; if (dh_pub->neg) { - logit("invalid public DH value: negativ"); + logit("invalid public DH value: negative"); return 0; } if (BN_cmp(dh_pub, BN_value_one()) != 1) { /* pub_exp <= 1 */ @@ -190,8 +190,10 @@ return 0; } - if ((tmp = BN_new()) == NULL) - return (-1); + if ((tmp = BN_new()) == NULL) { + error("%s: BN_new failed", __func__); + return 0; + } if (!BN_sub(tmp, dh->p, BN_value_one()) || BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */ BN_clear_free(tmp);