summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm <djm>2013-11-21 02:55:43 +0000
committerdjm <djm>2013-11-21 02:55:43 +0000
commit738f3f20964e85ab60555fdfeb15bf2d03994875 (patch)
tree01bcb5a7bd43ac7f04db85e77ff92c52d0aca4c0
parente241d777dae2a59bbe18a356bf93cef5dc92444c (diff)
downloadopenssh-738f3f20964e85ab60555fdfeb15bf2d03994875.tar.gz
- dtucker@cvs.openbsd.org 2013/11/08 11:15:19
[bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c] [uidswap.c] Include stdlib.h for free() as per the man page.
-rw-r--r--ChangeLog6
-rw-r--r--bufaux.c3
-rw-r--r--bufbn.c3
-rw-r--r--buffer.c3
-rw-r--r--sftp-client.c13
-rw-r--r--sftp-common.c3
-rw-r--r--sftp-glob.c5
-rw-r--r--uidswap.c3
8 files changed, 26 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 3fd51a6b..eb78c12e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20131121
+ - (djm) OpenBSD CVS Sync
+ - dtucker@cvs.openbsd.org 2013/11/08 11:15:19
+ [bufaux.c bufbn.c buffer.c sftp-client.c sftp-common.c sftp-glob.c]
+ [uidswap.c] Include stdlib.h for free() as per the man page.
+
20131110
- (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
querying the ones that are compiled in.
diff --git a/bufaux.c b/bufaux.c
index de5b3ca1..3e70b8d9 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufaux.c,v 1.52 2013/07/12 00:19:58 djm Exp $ */
+/* $OpenBSD: bufaux.c,v 1.53 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,6 +45,7 @@
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include "xmalloc.h"
#include "buffer.h"
diff --git a/bufbn.c b/bufbn.c
index 1fbfbbcc..2ebc80a2 100644
--- a/bufbn.c
+++ b/bufbn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufbn.c,v 1.7 2013/05/17 00:13:13 djm Exp $*/
+/* $OpenBSD: bufbn.c,v 1.8 2013/11/08 11:15:19 dtucker Exp $*/
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,6 +45,7 @@
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include "xmalloc.h"
#include "buffer.h"
diff --git a/buffer.c b/buffer.c
index 007e7f94..9e7c40a5 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.33 2013/05/17 00:13:13 djm Exp $ */
+/* $OpenBSD: buffer.c,v 1.34 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include "xmalloc.h"
#include "buffer.h"
diff --git a/sftp-client.c b/sftp-client.c
index 91955262..9ecded04 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.107 2013/10/17 00:30:13 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.109 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -42,6 +42,7 @@
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -477,7 +478,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int print_flag,
if (dir) {
ents = 0;
- *dir = xmalloc(sizeof(**dir));
+ *dir = xcalloc(1, sizeof(**dir));
(*dir)[0] = NULL;
}
@@ -551,7 +552,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int print_flag,
if (dir) {
*dir = xrealloc(*dir, ents + 2, sizeof(**dir));
- (*dir)[ents] = xmalloc(sizeof(***dir));
+ (*dir)[ents] = xcalloc(1, sizeof(***dir));
(*dir)[ents]->filename = xstrdup(filename);
(*dir)[ents]->longname = xstrdup(longname);
memcpy(&(*dir)[ents]->a, a, sizeof(*a));
@@ -570,7 +571,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int print_flag,
/* Don't return partial matches on interrupt */
if (interrupted && dir != NULL && *dir != NULL) {
free_sftp_dirents(*dir);
- *dir = xmalloc(sizeof(**dir));
+ *dir = xcalloc(1, sizeof(**dir));
**dir = NULL;
}
@@ -1143,7 +1144,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
(unsigned long long)offset,
(unsigned long long)offset + buflen - 1,
num_req, max_req);
- req = xmalloc(sizeof(*req));
+ req = xcalloc(1, sizeof(*req));
req->id = conn->msg_id++;
req->len = buflen;
req->offset = offset;
@@ -1512,7 +1513,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
strerror(errno));
if (len != 0) {
- ack = xmalloc(sizeof(*ack));
+ ack = xcalloc(1, sizeof(*ack));
ack->id = ++id;
ack->offset = offset;
ack->len = len;
diff --git a/sftp-common.c b/sftp-common.c
index 413efc20..88bf51bc 100644
--- a/sftp-common.c
+++ b/sftp-common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-common.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: sftp-common.c,v 1.25 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -33,6 +33,7 @@
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdarg.h>
diff --git a/sftp-glob.c b/sftp-glob.c
index 79b7bdb2..d85aecc9 100644
--- a/sftp-glob.c
+++ b/sftp-glob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: sftp-glob.c,v 1.26 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -23,6 +23,7 @@
#endif
#include <dirent.h>
+#include <stdlib.h>
#include <string.h>
#include "xmalloc.h"
@@ -48,7 +49,7 @@ fudge_opendir(const char *path)
{
struct SFTP_OPENDIR *r;
- r = xmalloc(sizeof(*r));
+ r = xcalloc(1, sizeof(*r));
if (do_readdir(cur.conn, (char *)path, &r->dir)) {
free(r);
diff --git a/uidswap.c b/uidswap.c
index 26d17f93..23217ba5 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uidswap.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: uidswap.c,v 1.36 2013/11/08 11:15:19 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -20,6 +20,7 @@
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <grp.h>