From 5d97c60219037367de7846b8baecbf0da4157294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 25 Feb 2003 10:51:30 +0000 Subject: [PATCH] use readlink with bufsize - 1, From NetBSD git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11662 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appl/ftp/ftpd/ls.c b/appl/ftp/ftpd/ls.c index a0f12ce8b..30d8f93a0 100644 --- a/appl/ftp/ftpd/ls.c +++ b/appl/ftp/ftpd/ls.c @@ -268,7 +268,7 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags) } if(S_ISLNK(st->st_mode)) { int n; - n = readlink((char *)filename, buf, sizeof(buf)); + n = readlink((char *)filename, buf, sizeof(buf) - 1); if(n >= 0) { buf[n] = '\0'; file->link = strdup(buf);