diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-30 21:41:36 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-30 21:41:36 +0000 |
commit | 751291fd62da691de3f0c25a8a9a464b4b8318c6 (patch) | |
tree | c37126fbb462c9bd4ee595c83af0977461bdf448 /driver.c | |
parent | 465f19899c2cb91eb0f2d5b42f35b82680ef5977 (diff) | |
download | fetchmail-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.c | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -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); |