aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
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);