diff options
Diffstat (limited to 'usr.bin/ssh/misc.c')
| -rw-r--r-- | usr.bin/ssh/misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c index 328473903f5..6110a6f8bd9 100644 --- a/usr.bin/ssh/misc.c +++ b/usr.bin/ssh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.95 2014/10/24 02:01:20 lteo Exp $ */ +/* $OpenBSD: misc.c,v 1.96 2015/01/16 06:40:12 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -28,7 +28,6 @@ #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/un.h> -#include <sys/param.h> #include <net/if.h> #include <netinet/in.h> @@ -41,6 +40,7 @@ #include <netdb.h> #include <paths.h> #include <pwd.h> +#include <limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -534,7 +534,7 @@ tilde_expand_filename(const char *filename, uid_t uid) if (path != NULL) filename = path + 1; - if (xasprintf(&ret, "%s%s%s", pw->pw_dir, sep, filename) >= MAXPATHLEN) + if (xasprintf(&ret, "%s%s%s", pw->pw_dir, sep, filename) >= PATH_MAX) fatal("tilde_expand_filename: Path too long"); return (ret); |
