Mercurial > hg > mlmmj
changeset 596:aefc70519e62
Fixed bug in gethdrline() introduced in 1.2.12-RC3
author | mortenp |
---|---|
date | Wed, 08 Nov 2006 08:50:25 +1100 |
parents | a38cde48669f |
children | ec9e2908f569 |
files | ChangeLog src/gethdrline.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Sep 30 06:08:20 2006 +1000 +++ b/ChangeLog Wed Nov 08 08:50:25 2006 +1100 @@ -1,3 +1,5 @@ + o Fixed bug in gethdrline() introduced in 1.2.12-RC3 +1.2.12-RC4 o Fixed memory leak in checkwait_smtpreply() o Changed mlmmj-process to look at environment variable DEFAULT instead of EXT for qmail (Fabio Busatto)
--- a/src/gethdrline.c Sat Sep 30 06:08:20 2006 +1000 +++ b/src/gethdrline.c Wed Nov 08 08:50:25 2006 +1100 @@ -40,6 +40,9 @@ ssize_t n; retstr = mygetline(fd); + if (!retstr) { + return NULL; + } /* do not attempt to unfold the end-of-headers marker */ if (retstr[0] == '\n') @@ -67,6 +70,9 @@ oldretstr = retstr; line = mygetline(fd); + if (!line) { + return retstr; + } retstr = concatstr(2, oldretstr, line);