summaryrefslogtreecommitdiffstats
path: root/sftp-server.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-01-21 00:14:00 +0100
committerDamien Miller <djm@mindrot.org>2015-01-26 13:58:53 +0100
commit087266ec33c76fc8d54ac5a19efacf2f4a4ca076 (patch)
tree71f57bb41b61561ebaa13026d8dc5d04d9829b00 /sftp-server.c
parentupstream commit (diff)
downloadopenssh-087266ec33c76fc8d54ac5a19efacf2f4a4ca076.tar.xz
openssh-087266ec33c76fc8d54ac5a19efacf2f4a4ca076.zip
upstream commit
Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sftp-server.c b/sftp-server.c
index 7d09504d9..4f735cd93 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.104 2015/01/14 13:54:13 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.105 2015/01/20 23:14:00 deraadt Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
@@ -17,8 +17,8 @@
#include "includes.h"
+#include <sys/param.h> /* MIN */
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@ -1055,7 +1055,7 @@ process_readdir(u_int32_t id)
send_status(id, SSH2_FX_FAILURE);
} else {
struct stat st;
- char pathname[MAXPATHLEN];
+ char pathname[PATH_MAX];
Stat *stats;
int nstats = 10, count = 0, i;
@@ -1150,7 +1150,7 @@ process_rmdir(u_int32_t id)
static void
process_realpath(u_int32_t id)
{
- char resolvedname[MAXPATHLEN];
+ char resolvedname[PATH_MAX];
char *path;
int r;
@@ -1238,7 +1238,7 @@ static void
process_readlink(u_int32_t id)
{
int r, len;
- char buf[MAXPATHLEN];
+ char buf[PATH_MAX];
char *path;
if ((r = sshbuf_get_cstring(iqueue, &path, NULL)) != 0)