Signed-off-by: Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx> --- term-utils/write.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/term-utils/write.c b/term-utils/write.c index c8aca7e..901ddc4 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -102,7 +102,7 @@ int main(int argc, char **argv) time_t atime; uid_t myuid; int msgsok, myttyfd, c; - char tty[MAXPATHLEN], *mytty; + char tty[PATH_MAX], *mytty; static const struct option longopts[] = { {"version", no_argument, NULL, 'V'}, @@ -296,7 +296,7 @@ void search_utmp(char *user, char *tty, char *mytty, uid_t myuid) int term_chk(char *tty, int *msgsokP, time_t * atimeP, int showerror) { struct stat s; - char path[MAXPATHLEN]; + char path[PATH_MAX]; if (strlen(tty) + 6 > sizeof(path)) return 1; @@ -321,7 +321,7 @@ void do_write(char *tty, char *mytty, uid_t myuid) char *login, *pwuid, *nows; struct passwd *pwd; time_t now; - char path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512]; + char path[PATH_MAX], host[MAXHOSTNAMELEN], line[512]; /* Determine our login name(s) before the we reopen() stdout */ if ((pwd = getpwuid(myuid)) != NULL) -- 1.7.9 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html