aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--driver.c26
2 files changed, 21 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index da21d29e..ad9ede20 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ features --
* Whether or not carriage returns will be stripped on output is explicitly
controllable with stripcr.
+* fetchmail -v messages no longer reveal password lengths.
+
bugs --
* Correction to length-extraction code for servers that return (nnn octets).
@@ -15,7 +17,7 @@ bugs --
* Correction to RF822 continuation code so it doesn't eat leading blank-led
lines in the text.
-There are 211 people on the fetchmail-friends list.
+There are 212 people on the fetchmail-friends list.
------------------------------------------------------------------------------
fetchmail-3.2 (Mon Jan 27 02:51:10 EST 1997)
diff --git a/driver.c b/driver.c
index ee57a805..fd4e4155 100644
--- a/driver.c
+++ b/driver.c
@@ -1468,12 +1468,17 @@ va_dcl
if (outlevel == O_VERBOSE)
{
- if (shroud)
+ char *cp;
+
+ if (shroud && (cp = strstr(buf, shroud)))
{
- char *cp;
+ char *sp;
- if ((cp = strstr(buf, shroud)))
- memset(cp, '*', strlen(shroud));
+ sp = cp + strlen(shroud);
+ *cp++ = '*';
+ while (*sp)
+ *cp++ = *sp++;
+ *sp = '\0';
}
buf[strlen(buf)-2] = '\0';
error(0, 0, "%s> %s", protocol->name, buf);
@@ -1533,12 +1538,17 @@ va_dcl
if (outlevel == O_VERBOSE)
{
- if (shroud)
+ char *cp;
+
+ if (shroud && (cp = strstr(buf, shroud)))
{
- char *cp;
+ char *sp;
- if ((cp = strstr(buf, shroud)))
- memset(cp, '*', strlen(shroud));
+ sp = cp + strlen(shroud);
+ *cp++ = '*';
+ while (*sp)
+ *cp++ = *sp++;
+ *sp = '\0';
}
buf[strlen(buf)-1] = '\0';
error(0, 0, "%s> %s", protocol->name, buf);