summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--README4
-rw-r--r--auth-options.c4
-rw-r--r--auth2-chall.c4
-rw-r--r--authfd.c4
-rw-r--r--channels.c4
-rw-r--r--cipher-3des1.c4
-rw-r--r--clientloop.c8
-rw-r--r--contrib/caldera/openssh.spec4
-rw-r--r--contrib/redhat/openssh.spec2
-rw-r--r--contrib/suse/openssh.spec2
-rw-r--r--gss-genr.c4
-rw-r--r--monitor_mm.c7
-rw-r--r--monitor_wrap.c4
-rw-r--r--packet.c4
-rw-r--r--schnorr.c4
-rw-r--r--sftp-client.c12
-rw-r--r--sftp-glob.c4
-rw-r--r--sftp-server.05
-rw-r--r--sftp.05
-rw-r--r--umac.c4
-rw-r--r--version.h4
22 files changed, 65 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a0d2545e..6175764f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
120131108
2 - (djm) OpenBSD CVS Sync
3 - markus@cvs.openbsd.org 2013/11/06 16:52:11
4 [monitor_wrap.c]
5 fix rekeying for AES-GCM modes; ok deraadt
6 - djm@cvs.openbsd.org 2013/11/08 00:39:15
7 [auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c]
8 [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c]
9 [sftp-client.c sftp-glob.c]
10 use calloc for all structure allocations; from markus@
11 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
12 [contrib/suse/openssh.spec] update version numbers
13 - djm@cvs.openbsd.org 2013/11/08 01:38:11
14 [version.h]
15 openssh-6.4
16 - (djm) Release 6.4p1
17
120130913 1820130913
2 - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code; 19 - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code;
3 ok dtucker@ 20 ok dtucker@
diff --git a/README b/README
index ece2dba19..0c52f1371 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1See http://www.openssh.com/txt/release-6.3 for the release notes. 1See http://www.openssh.com/txt/release-6.4 for the release notes.
2 2
3- A Japanese translation of this document and of the OpenSSH FAQ is 3- A Japanese translation of this document and of the OpenSSH FAQ is
4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html 4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
@@ -62,4 +62,4 @@ References -
62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
63[7] http://www.openssh.com/faq.html 63[7] http://www.openssh.com/faq.html
64 64
65$Id: README,v 1.83 2013/07/25 02:34:00 djm Exp $ 65$Id: README,v 1.83.4.1 2013/11/08 01:36:17 djm Exp $
diff --git a/auth-options.c b/auth-options.c
index 80d59ee95..12e2e1dca 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */ 1/* $OpenBSD: auth-options.c,v 1.61 2013/11/08 00:39:14 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -239,7 +239,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
239 auth_debug_add("Adding to environment: %.900s", s); 239 auth_debug_add("Adding to environment: %.900s", s);
240 debug("Adding to environment: %.900s", s); 240 debug("Adding to environment: %.900s", s);
241 opts++; 241 opts++;
242 new_envstring = xmalloc(sizeof(struct envstring)); 242 new_envstring = xcalloc(1, sizeof(struct envstring));
243 new_envstring->s = s; 243 new_envstring->s = s;
244 new_envstring->next = custom_environment; 244 new_envstring->next = custom_environment;
245 custom_environment = new_envstring; 245 custom_environment = new_envstring;
diff --git a/auth2-chall.c b/auth2-chall.c
index 98f3093ce..031c2828c 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-chall.c,v 1.38 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: auth2-chall.c,v 1.39 2013/11/08 00:39:14 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2001 Per Allansson. All rights reserved. 4 * Copyright (c) 2001 Per Allansson. All rights reserved.
@@ -111,7 +111,7 @@ kbdint_alloc(const char *devs)
111 remove_kbdint_device("pam"); 111 remove_kbdint_device("pam");
112#endif 112#endif
113 113
114 kbdintctxt = xmalloc(sizeof(KbdintAuthctxt)); 114 kbdintctxt = xcalloc(1, sizeof(KbdintAuthctxt));
115 if (strcmp(devs, "") == 0) { 115 if (strcmp(devs, "") == 0) {
116 buffer_init(&b); 116 buffer_init(&b);
117 for (i = 0; devices[i]; i++) { 117 for (i = 0; devices[i]; i++) {
diff --git a/authfd.c b/authfd.c
index 775786bee..5cce93b76 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.87 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: authfd.c,v 1.88 2013/11/08 00:39:14 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -206,7 +206,7 @@ ssh_get_authentication_connection(void)
206 if (sock < 0) 206 if (sock < 0)
207 return NULL; 207 return NULL;
208 208
209 auth = xmalloc(sizeof(*auth)); 209 auth = xcalloc(1, sizeof(*auth));
210 auth->fd = sock; 210 auth->fd = sock;
211 buffer_init(&auth->identities); 211 buffer_init(&auth->identities);
212 auth->howmany = 0; 212 auth->howmany = 0;
diff --git a/channels.c b/channels.c
index ac675c742..a1c31d8a0 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.324 2013/07/12 00:19:58 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.327 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -704,7 +704,7 @@ channel_register_status_confirm(int id, channel_confirm_cb *cb,
704 if ((c = channel_lookup(id)) == NULL) 704 if ((c = channel_lookup(id)) == NULL)
705 fatal("channel_register_expect: %d: bad id", id); 705 fatal("channel_register_expect: %d: bad id", id);
706 706
707 cc = xmalloc(sizeof(*cc)); 707 cc = xcalloc(1, sizeof(*cc));
708 cc->cb = cb; 708 cc->cb = cb;
709 cc->abandon_cb = abandon_cb; 709 cc->abandon_cb = abandon_cb;
710 cc->ctx = ctx; 710 cc->ctx = ctx;
diff --git a/cipher-3des1.c b/cipher-3des1.c
index c8a70244b..56fc77786 100644
--- a/cipher-3des1.c
+++ b/cipher-3des1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cipher-3des1.c,v 1.8 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: cipher-3des1.c,v 1.9 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2003 Markus Friedl. All rights reserved. 3 * Copyright (c) 2003 Markus Friedl. All rights reserved.
4 * 4 *
@@ -67,7 +67,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
67 u_char *k1, *k2, *k3; 67 u_char *k1, *k2, *k3;
68 68
69 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) { 69 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
70 c = xmalloc(sizeof(*c)); 70 c = xcalloc(1, sizeof(*c));
71 EVP_CIPHER_CTX_set_app_data(ctx, c); 71 EVP_CIPHER_CTX_set_app_data(ctx, c);
72 } 72 }
73 if (key == NULL) 73 if (key == NULL)
diff --git a/clientloop.c b/clientloop.c
index 86695cc16..311dc1393 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.253 2013/06/07 15:37:52 dtucker Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -841,7 +841,7 @@ void
841client_expect_confirm(int id, const char *request, 841client_expect_confirm(int id, const char *request,
842 enum confirm_action action) 842 enum confirm_action action)
843{ 843{
844 struct channel_reply_ctx *cr = xmalloc(sizeof(*cr)); 844 struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr));
845 845
846 cr->request_type = request; 846 cr->request_type = request;
847 cr->action = action; 847 cr->action = action;
@@ -864,7 +864,7 @@ client_register_global_confirm(global_confirm_cb *cb, void *ctx)
864 return; 864 return;
865 } 865 }
866 866
867 gc = xmalloc(sizeof(*gc)); 867 gc = xcalloc(1, sizeof(*gc));
868 gc->cb = cb; 868 gc->cb = cb;
869 gc->ctx = ctx; 869 gc->ctx = ctx;
870 gc->ref_count = 1; 870 gc->ref_count = 1;
@@ -1442,7 +1442,7 @@ client_new_escape_filter_ctx(int escape_char)
1442{ 1442{
1443 struct escape_filter_ctx *ret; 1443 struct escape_filter_ctx *ret;
1444 1444
1445 ret = xmalloc(sizeof(*ret)); 1445 ret = xcalloc(1, sizeof(*ret));
1446 ret->escape_pending = 0; 1446 ret->escape_pending = 0;
1447 ret->escape_char = escape_char; 1447 ret->escape_char = escape_char;
1448 return (void *)ret; 1448 return (void *)ret;
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index b460bfff0..d026b72d8 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -16,7 +16,7 @@
16 16
17#old cvs stuff. please update before use. may be deprecated. 17#old cvs stuff. please update before use. may be deprecated.
18%define use_stable 1 18%define use_stable 1
19%define version 6.3p1 19%define version 6.4p1
20%if %{use_stable} 20%if %{use_stable}
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 1
@@ -363,4 +363,4 @@ fi
363* Mon Jan 01 1998 ... 363* Mon Jan 01 1998 ...
364Template Version: 1.31 364Template Version: 1.31
365 365
366$Id: openssh.spec,v 1.80 2013/07/25 02:34:00 djm Exp $ 366$Id: openssh.spec,v 1.80.4.1 2013/11/08 01:36:19 djm Exp $
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index d1191f4e1..29a38dedc 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 6.3p1 1%define ver 6.4p1
2%define rel 1 2%define rel 1
3 3
4# OpenSSH privilege separation requires a user & group ID 4# OpenSSH privilege separation requires a user & group ID
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 2866039d1..3a612bd23 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -13,7 +13,7 @@
13 13
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh 15Name: openssh
16Version: 6.3p1 16Version: 6.4p1
17URL: http://www.openssh.com/ 17URL: http://www.openssh.com/
18Release: 1 18Release: 1
19Source0: openssh-%{version}.tar.gz 19Source0: openssh-%{version}.tar.gz
diff --git a/gss-genr.c b/gss-genr.c
index 3069347c2..b7d1b7dbf 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-genr.c,v 1.21 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: gss-genr.c,v 1.22 2013/11/08 00:39:15 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
@@ -217,7 +217,7 @@ ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
217 free(ctx->oid->elements); 217 free(ctx->oid->elements);
218 free(ctx->oid); 218 free(ctx->oid);
219 } 219 }
220 ctx->oid = xmalloc(sizeof(gss_OID_desc)); 220 ctx->oid = xcalloc(1, sizeof(gss_OID_desc));
221 ctx->oid->length = len; 221 ctx->oid->length = len;
222 ctx->oid->elements = xmalloc(len); 222 ctx->oid->elements = xmalloc(len);
223 memcpy(ctx->oid->elements, data, len); 223 memcpy(ctx->oid->elements, data, len);
diff --git a/monitor_mm.c b/monitor_mm.c
index ee7bad4b4..d3e6aeee5 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_mm.c,v 1.17 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: monitor_mm.c,v 1.18 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -65,7 +65,7 @@ mm_make_entry(struct mm_master *mm, struct mmtree *head,
65 struct mm_share *tmp, *tmp2; 65 struct mm_share *tmp, *tmp2;
66 66
67 if (mm->mmalloc == NULL) 67 if (mm->mmalloc == NULL)
68 tmp = xmalloc(sizeof(struct mm_share)); 68 tmp = xcalloc(1, sizeof(struct mm_share));
69 else 69 else
70 tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share)); 70 tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share));
71 tmp->address = address; 71 tmp->address = address;
@@ -88,7 +88,7 @@ mm_create(struct mm_master *mmalloc, size_t size)
88 struct mm_master *mm; 88 struct mm_master *mm;
89 89
90 if (mmalloc == NULL) 90 if (mmalloc == NULL)
91 mm = xmalloc(sizeof(struct mm_master)); 91 mm = xcalloc(1, sizeof(struct mm_master));
92 else 92 else
93 mm = mm_xmalloc(mmalloc, sizeof(struct mm_master)); 93 mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
94 94
@@ -161,6 +161,7 @@ mm_xmalloc(struct mm_master *mm, size_t size)
161 address = mm_malloc(mm, size); 161 address = mm_malloc(mm, size);
162 if (address == NULL) 162 if (address == NULL)
163 fatal("%s: mm_malloc(%lu)", __func__, (u_long)size); 163 fatal("%s: mm_malloc(%lu)", __func__, (u_long)size);
164 memset(address, 0, size);
164 return (address); 165 return (address);
165} 166}
166 167
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 433b234d2..44019f32a 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.76 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: monitor_wrap.c,v 1.77 2013/11/06 16:52:11 markus Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -482,7 +482,7 @@ mm_newkeys_from_blob(u_char *blob, int blen)
482 buffer_init(&b); 482 buffer_init(&b);
483 buffer_append(&b, blob, blen); 483 buffer_append(&b, blob, blen);
484 484
485 newkey = xmalloc(sizeof(*newkey)); 485 newkey = xcalloc(1, sizeof(*newkey));
486 enc = &newkey->enc; 486 enc = &newkey->enc;
487 mac = &newkey->mac; 487 mac = &newkey->mac;
488 comp = &newkey->comp; 488 comp = &newkey->comp;
diff --git a/packet.c b/packet.c
index 0d27e7592..90db33bdd 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.188 2013/07/12 00:19:58 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.189 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -996,7 +996,7 @@ packet_send2(void)
996 (type == SSH2_MSG_SERVICE_REQUEST) || 996 (type == SSH2_MSG_SERVICE_REQUEST) ||
997 (type == SSH2_MSG_SERVICE_ACCEPT)) { 997 (type == SSH2_MSG_SERVICE_ACCEPT)) {
998 debug("enqueue packet: %u", type); 998 debug("enqueue packet: %u", type);
999 p = xmalloc(sizeof(*p)); 999 p = xcalloc(1, sizeof(*p));
1000 p->type = type; 1000 p->type = type;
1001 memcpy(&p->payload, &active_state->outgoing_packet, 1001 memcpy(&p->payload, &active_state->outgoing_packet,
1002 sizeof(Buffer)); 1002 sizeof(Buffer));
diff --git a/schnorr.c b/schnorr.c
index 9549dcf0e..93822fed4 100644
--- a/schnorr.c
+++ b/schnorr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: schnorr.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: schnorr.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Damien Miller. All rights reserved. 3 * Copyright (c) 2008 Damien Miller. All rights reserved.
4 * 4 *
@@ -549,7 +549,7 @@ modp_group_from_g_and_safe_p(const char *grp_g, const char *grp_p)
549{ 549{
550 struct modp_group *ret; 550 struct modp_group *ret;
551 551
552 ret = xmalloc(sizeof(*ret)); 552 ret = xcalloc(1, sizeof(*ret));
553 ret->p = ret->q = ret->g = NULL; 553 ret->p = ret->q = ret->g = NULL;
554 if (BN_hex2bn(&ret->p, grp_p) == 0 || 554 if (BN_hex2bn(&ret->p, grp_p) == 0 ||
555 BN_hex2bn(&ret->g, grp_g) == 0) 555 BN_hex2bn(&ret->g, grp_g) == 0)
diff --git a/sftp-client.c b/sftp-client.c
index f4f1970b6..2f9793778 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.101 2013/07/25 00:56:51 djm Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.108 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -471,7 +471,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
471 471
472 if (dir) { 472 if (dir) {
473 ents = 0; 473 ents = 0;
474 *dir = xmalloc(sizeof(**dir)); 474 *dir = xcalloc(1, sizeof(**dir));
475 (*dir)[0] = NULL; 475 (*dir)[0] = NULL;
476 } 476 }
477 477
@@ -545,7 +545,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
545 545
546 if (dir) { 546 if (dir) {
547 *dir = xrealloc(*dir, ents + 2, sizeof(**dir)); 547 *dir = xrealloc(*dir, ents + 2, sizeof(**dir));
548 (*dir)[ents] = xmalloc(sizeof(***dir)); 548 (*dir)[ents] = xcalloc(1, sizeof(***dir));
549 (*dir)[ents]->filename = xstrdup(filename); 549 (*dir)[ents]->filename = xstrdup(filename);
550 (*dir)[ents]->longname = xstrdup(longname); 550 (*dir)[ents]->longname = xstrdup(longname);
551 memcpy(&(*dir)[ents]->a, a, sizeof(*a)); 551 memcpy(&(*dir)[ents]->a, a, sizeof(*a));
@@ -564,7 +564,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
564 /* Don't return partial matches on interrupt */ 564 /* Don't return partial matches on interrupt */
565 if (interrupted && dir != NULL && *dir != NULL) { 565 if (interrupted && dir != NULL && *dir != NULL) {
566 free_sftp_dirents(*dir); 566 free_sftp_dirents(*dir);
567 *dir = xmalloc(sizeof(**dir)); 567 *dir = xcalloc(1, sizeof(**dir));
568 **dir = NULL; 568 **dir = NULL;
569 } 569 }
570 570
@@ -1105,7 +1105,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
1105 (unsigned long long)offset, 1105 (unsigned long long)offset,
1106 (unsigned long long)offset + buflen - 1, 1106 (unsigned long long)offset + buflen - 1,
1107 num_req, max_req); 1107 num_req, max_req);
1108 req = xmalloc(sizeof(*req)); 1108 req = xcalloc(1, sizeof(*req));
1109 req->id = conn->msg_id++; 1109 req->id = conn->msg_id++;
1110 req->len = buflen; 1110 req->len = buflen;
1111 req->offset = offset; 1111 req->offset = offset;
@@ -1463,7 +1463,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1463 strerror(errno)); 1463 strerror(errno));
1464 1464
1465 if (len != 0) { 1465 if (len != 0) {
1466 ack = xmalloc(sizeof(*ack)); 1466 ack = xcalloc(1, sizeof(*ack));
1467 ack->id = ++id; 1467 ack->id = ++id;
1468 ack->offset = offset; 1468 ack->offset = offset;
1469 ack->len = len; 1469 ack->len = len;
diff --git a/sftp-glob.c b/sftp-glob.c
index 79b7bdb2f..e1f5a6109 100644
--- a/sftp-glob.c
+++ b/sftp-glob.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-glob.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: sftp-glob.c,v 1.25 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -48,7 +48,7 @@ fudge_opendir(const char *path)
48{ 48{
49 struct SFTP_OPENDIR *r; 49 struct SFTP_OPENDIR *r;
50 50
51 r = xmalloc(sizeof(*r)); 51 r = xcalloc(1, sizeof(*r));
52 52
53 if (do_readdir(cur.conn, (char *)path, &r->dir)) { 53 if (do_readdir(cur.conn, (char *)path, &r->dir)) {
54 free(r); 54 free(r);
diff --git a/sftp-server.0 b/sftp-server.0
index bca318b38..391f42736 100644
--- a/sftp-server.0
+++ b/sftp-server.0
@@ -61,9 +61,8 @@ DESCRIPTION
61SEE ALSO 61SEE ALSO
62 sftp(1), ssh(1), sshd_config(5), sshd(8) 62 sftp(1), ssh(1), sshd_config(5), sshd(8)
63 63
64 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, 64 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
65 draft-ietf-secsh-filexfer-02.txt, October 2001, work in progress 65 filexfer-02.txt, October 2001, work in progress material.
66 material.
67 66
68HISTORY 67HISTORY
69 sftp-server first appeared in OpenBSD 2.8. 68 sftp-server first appeared in OpenBSD 2.8.
diff --git a/sftp.0 b/sftp.0
index c5fa17892..8bfc8086b 100644
--- a/sftp.0
+++ b/sftp.0
@@ -342,8 +342,7 @@ SEE ALSO
342 ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3), 342 ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3),
343 ssh_config(5), sftp-server(8), sshd(8) 343 ssh_config(5), sftp-server(8), sshd(8)
344 344
345 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, 345 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
346 draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress 346 filexfer-00.txt, January 2001, work in progress material.
347 material.
348 347
349OpenBSD 5.4 July 25, 2013 OpenBSD 5.4 348OpenBSD 5.4 July 25, 2013 OpenBSD 5.4
diff --git a/umac.c b/umac.c
index 99416a510..0c62145fa 100644
--- a/umac.c
+++ b/umac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: umac.c,v 1.7 2013/07/22 05:00:17 djm Exp $ */ 1/* $OpenBSD: umac.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */
2/* ----------------------------------------------------------------------- 2/* -----------------------------------------------------------------------
3 * 3 *
4 * umac.c -- C Implementation UMAC Message Authentication 4 * umac.c -- C Implementation UMAC Message Authentication
@@ -1227,7 +1227,7 @@ struct umac_ctx *umac_new(const u_char key[])
1227 size_t bytes_to_add; 1227 size_t bytes_to_add;
1228 aes_int_key prf_key; 1228 aes_int_key prf_key;
1229 1229
1230 octx = ctx = xmalloc(sizeof(*ctx) + ALLOC_BOUNDARY); 1230 octx = ctx = xcalloc(1, sizeof(*ctx) + ALLOC_BOUNDARY);
1231 if (ctx) { 1231 if (ctx) {
1232 if (ALLOC_BOUNDARY) { 1232 if (ALLOC_BOUNDARY) {
1233 bytes_to_add = ALLOC_BOUNDARY - 1233 bytes_to_add = ALLOC_BOUNDARY -
diff --git a/version.h b/version.h
index f6ec0ee3b..39033ed3e 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
1/* $OpenBSD: version.h,v 1.67 2013/07/25 00:57:37 djm Exp $ */ 1/* $OpenBSD: version.h,v 1.68 2013/11/08 01:38:11 djm Exp $ */
2 2
3#define SSH_VERSION "OpenSSH_6.3" 3#define SSH_VERSION "OpenSSH_6.4"
4 4
5#define SSH_PORTABLE "p1" 5#define SSH_PORTABLE "p1"
6#define SSH_RELEASE SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE SSH_VERSION SSH_PORTABLE