summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sftp-server.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-04-24 01:36:00 +0000
committerderaadt <deraadt@openbsd.org>2015-04-24 01:36:00 +0000
commite3b4f072510741cebbf90dcbdca1b00464b0e33c (patch)
treea66dbb091600eb0a92695b64d0e53d6e21c72901 /usr.bin/ssh/sftp-server.c
parentReplace atoi() usage with strtonum(). OK deraadt@ (diff)
downloadwireguard-openbsd-e3b4f072510741cebbf90dcbdca1b00464b0e33c.tar.xz
wireguard-openbsd-e3b4f072510741cebbf90dcbdca1b00464b0e33c.zip
rename xrealloc() to xreallocarray() since it follows that form.
ok djm
Diffstat (limited to 'usr.bin/ssh/sftp-server.c')
-rw-r--r--usr.bin/ssh/sftp-server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c
index 2e7cdd340be..075e7b2ae22 100644
--- a/usr.bin/ssh/sftp-server.c
+++ b/usr.bin/ssh/sftp-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.105 2015/01/20 23:14:00 deraadt Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.106 2015/04/24 01:36:01 deraadt Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
@@ -298,7 +298,7 @@ handle_new(int use, const char *name, int fd, int flags, DIR *dirp)
if (num_handles + 1 <= num_handles)
return -1;
num_handles++;
- handles = xrealloc(handles, num_handles, sizeof(Handle));
+ handles = xreallocarray(handles, num_handles, sizeof(Handle));
handle_unused(num_handles - 1);
}
@@ -1039,7 +1039,7 @@ process_readdir(u_int32_t id)
while ((dp = readdir(dirp)) != NULL) {
if (count >= nstats) {
nstats *= 2;
- stats = xrealloc(stats, nstats, sizeof(Stat));
+ stats = xreallocarray(stats, nstats, sizeof(Stat));
}
/* XXX OVERFLOW ? */
snprintf(pathname, sizeof pathname, "%s%s%s", path,