summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index 2f11de40f..38af3dfe3 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.95 2014/10/24 02:01:20 lteo Exp $ */ 1/* $OpenBSD: misc.c,v 1.96 2015/01/16 06:40:12 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -30,8 +30,8 @@
30#include <sys/ioctl.h> 30#include <sys/ioctl.h>
31#include <sys/socket.h> 31#include <sys/socket.h>
32#include <sys/un.h> 32#include <sys/un.h>
33#include <sys/param.h>
34 33
34#include <limits.h>
35#include <stdarg.h> 35#include <stdarg.h>
36#include <stdio.h> 36#include <stdio.h>
37#include <stdlib.h> 37#include <stdlib.h>
@@ -551,7 +551,7 @@ tilde_expand_filename(const char *filename, uid_t uid)
551 if (path != NULL) 551 if (path != NULL)
552 filename = path + 1; 552 filename = path + 1;
553 553
554 if (xasprintf(&ret, "%s%s%s", pw->pw_dir, sep, filename) >= MAXPATHLEN) 554 if (xasprintf(&ret, "%s%s%s", pw->pw_dir, sep, filename) >= PATH_MAX)
555 fatal("tilde_expand_filename: Path too long"); 555 fatal("tilde_expand_filename: Path too long");
556 556
557 return (ret); 557 return (ret);