From fe7fe1904f61ce9b03d28f34640687d887cca01c Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 8 Dec 2008 01:31:28 -0500 Subject: snapshot of project "lynx", label v2-8-7dev_10c --- src/LYShowInfo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/LYShowInfo.c') diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 2be79dd2..f335a4a8 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -1,4 +1,4 @@ -/* $LynxId: LYShowInfo.c,v 1.65 2007/05/06 19:08:31 tom Exp $ */ +/* $LynxId: LYShowInfo.c,v 1.66 2008/12/07 22:14:05 tom Exp $ */ #include #include #include @@ -203,13 +203,14 @@ int LYShowInfo(DocInfo *doc, ADD_SS(gettext("Full name:"), temp); #ifdef S_IFLNK if (S_ISLNK(dir_info.st_mode)) { - char buf[1025]; + char buf[MAX_LINE]; int buf_size; if ((buf_size = readlink(temp, buf, sizeof(buf) - 1)) != -1) { buf[buf_size] = '\0'; } else { - sprintf(buf, "%.1024s", gettext("Unable to follow link")); + sprintf(buf, "%.*s", (int) sizeof(buf) - 1, + gettext("Unable to follow link")); } ADD_SS(gettext("Points to file:"), buf); } -- cgit 1.4.1-2-gfad0