diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-12-01 05:47:28 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-12-01 05:47:28 +0000 |
commit | b5bcfbf59a39f3f65e87a2c658c21193c6a77bae (patch) | |
tree | e90d30b1a9b1e90db810133499a272fc688797d9 /driver.c | |
parent | 32833fe55b36b1b310901a26177a779d67176f1e (diff) | |
download | fetchmail-b5bcfbf59a39f3f65e87a2c658c21193c6a77bae.tar.gz fetchmail-b5bcfbf59a39f3f65e87a2c658c21193c6a77bae.tar.bz2 fetchmail-b5bcfbf59a39f3f65e87a2c658c21193c6a77bae.zip |
Chip Salzenberg's patch.
svn path=/trunk/; revision=2992
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -740,14 +740,16 @@ static int readheaders(int sock, } else { + char *newhdrs; int newlen; newlen = oldlen + strlen(line); - msgblk.headers = (char *) realloc(msgblk.headers, newlen + 1); - if (msgblk.headers == NULL) { + newhdrs = (char *) realloc(msgblk.headers, newlen + 1); + if (newhdrs == NULL) { free(line); return(PS_IOERR); } + msgblk.headers = newhdrs; strcpy(msgblk.headers + oldlen, line); free(line); line = msgblk.headers + oldlen; |