=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keysign.c,v retrieving revision 1.10 retrieving revision 1.10.2.2 diff -u -r1.10 -r1.10.2.2 --- src/usr.bin/ssh/ssh-keysign.c 2003/03/13 11:42:19 1.10 +++ src/usr.bin/ssh/ssh-keysign.c 2004/03/04 18:18:16 1.10.2.2 @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.10 2003/03/13 11:42:19 markus Exp $"); +RCSID("$OpenBSD: ssh-keysign.c,v 1.10.2.2 2004/03/04 18:18:16 brad Exp $"); #include #include @@ -42,14 +42,15 @@ #include "pathnames.h" #include "readconf.h" -uid_t original_real_uid; /* XXX readconf.c needs this */ +/* XXX readconf.c needs these */ +uid_t original_real_uid; static int valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, u_int datalen) { Buffer b; - Key *key; + Key *key = NULL; u_char *pkblob; u_int blen, len; char *pkalg, *p; @@ -119,6 +120,7 @@ /* end of message */ if (buffer_len(&b) != 0) fail++; + buffer_free(&b); debug3("valid_request: fail %d", fail); @@ -222,7 +224,8 @@ /* send reply */ buffer_clear(&b); buffer_put_string(&b, signature, slen); - ssh_msg_send(STDOUT_FILENO, version, &b); + if (ssh_msg_send(STDOUT_FILENO, version, &b) == -1) + fatal("ssh_msg_send failed"); return (0); }