diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-09-22 20:25:34 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-09-22 20:25:34 +0000 |
commit | 206e749fc33982847124b3714c2749f80e3b9407 (patch) | |
tree | 45f892c4642c9d0999bbe4aaae96bcf05e0ad7ab /driver.c | |
parent | 349bb82a9c88ec849f27b42e904fecbdc159399f (diff) | |
download | fetchmail-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) { |