about summary refs log tree commit diff stats
path: root/src/LYShowInfo.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2008-12-08 01:31:28 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2008-12-08 01:31:28 -0500
commitfe7fe1904f61ce9b03d28f34640687d887cca01c (patch)
treed34e27795f9e1ac515c64f2f0e77d63534e60fd8 /src/LYShowInfo.c
parent711a9d1b98ce96d750833e0782afad12c3cfb286 (diff)
downloadlynx-snapshots-fe7fe1904f61ce9b03d28f34640687d887cca01c.tar.gz
snapshot of project "lynx", label v2-8-7dev_10c
Diffstat (limited to 'src/LYShowInfo.c')
-rw-r--r--src/LYShowInfo.c7
1 files changed, 4 insertions, 3 deletions
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 <HTUtils.h>
 #include <HTFile.h>
 #include <HTParse.h>
@@ -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);
 	    }