aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-30 21:41:36 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-30 21:41:36 +0000
commit751291fd62da691de3f0c25a8a9a464b4b8318c6 (patch)
treec37126fbb462c9bd4ee595c83af0977461bdf448 /driver.c
parent465f19899c2cb91eb0f2d5b42f35b82680ef5977 (diff)
downloadfetchmail-751291fd62da691de3f0c25a8a9a464b4b8318c6.tar.gz
fetchmail-751291fd62da691de3f0c25a8a9a464b4b8318c6.tar.bz2
fetchmail-751291fd62da691de3f0c25a8a9a464b4b8318c6.zip
Shroud password lengths.
svn path=/trunk/; revision=848
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c26
1 files changed, 18 insertions, 8 deletions
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);