aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-09-22 20:25:34 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-09-22 20:25:34 +0000
commit206e749fc33982847124b3714c2749f80e3b9407 (patch)
tree45f892c4642c9d0999bbe4aaae96bcf05e0ad7ab /driver.c
parent349bb82a9c88ec849f27b42e904fecbdc159399f (diff)
downloadfetchmail-206e749fc33982847124b3714c2749f80e3b9407.tar.gz
fetchmail-206e749fc33982847124b3714c2749f80e3b9407.tar.bz2
fetchmail-206e749fc33982847124b3714c2749f80e3b9407.zip
Prevent buffer overruns.
svn path=/trunk/; revision=1384
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver.c b/driver.c
index 04b6683b..79a95b64 100644
--- a/driver.c
+++ b/driver.c
@@ -562,8 +562,9 @@ int num; /* index of message */
}
set_timeout(ctl->server.timeout);
- /* leave extra room for reply_hack to play with */
- line = (char *) realloc(line, strlen(line) + strlen(buf) + HOSTLEN + 1);
+
+ line = (char *) realloc(line, strlen(line) + strlen(buf) +1);
+
strcat(line, buf);
if (line[0] == '\r' && line[1] == '\n')
break;
@@ -671,7 +672,7 @@ int num; /* index of message */
}
if (ctl->rewrite)
- reply_hack(line, realname);
+ line = reply_hack(line, realname);
if (!headers)
{