- (djm) Use standard OpenSSL functions in auth-skey.c. Patch from
   Chris, the Young One <cky@pobox.com>
diff --git a/scp.c b/scp.c
index 0a89985..5f849cc 100644
--- a/scp.c
+++ b/scp.c
@@ -56,6 +56,14 @@
 /* For progressmeter() -- number of seconds before xfer considered "stalled" */
 #define STALLTIME	5
 
+/* Progress meter bar */
+#define BAR \
+	"************************************************************"\
+	"************************************************************"\
+	"************************************************************"\
+	"************************************************************"
+#define MAX_BARLENGTH (sizeof(BAR) - 1)
+
 /* Visual statistics about files as they are transferred. */
 void progressmeter(int);
 
@@ -1172,13 +1180,11 @@
 	snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
 
 	barlength = getttywidth() - 51;
+	barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH;
 	if (barlength > 0) {
 		i = barlength * ratio / 100;
 		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-			 "|%.*s%*s|", i,
-			 "*****************************************************************************"
-			 "*****************************************************************************",
-			 barlength - i, "");
+			 "|%.*s%*s|", i, BAR, barlength - i, "");
 	}
 	i = 0;
 	abbrevsize = cursize;