summaryrefslogtreecommitdiff
path: root/mail/dbmail-devel/files/patch-2.0.4_bug216_header.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-07-18 16:04:16 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-07-18 16:04:16 +0000
commit05065d99c78a53f6ab97086574a01d75be79decc (patch)
tree2f9f09b2b30cc41ccd58808030a38660205a46fb /mail/dbmail-devel/files/patch-2.0.4_bug216_header.c
parent- Update to 1.3.2 (diff)
- Patch nine bugs:
#79 - INTERNALDATE reponses do not conform to RFC #145 - LMTP loses return-path #177 - Compile Fails on FreeBSD (fixes compilation on FreeBSD 4.X) #184 - socklen_t issue #190 - huge load if database crash #198 - DBMail processes killing each other #199 - spare child creates zombie #214 - dbmail-smtp dumps core with double free #216 - malformed header prevents delivery - Fix RC_SUBR usage PR: ports/83437, also ports/80736, ports/82437, ports/83575 Submitted by: Mark Starovoytov <mark@kikg.ifmo.ru>, parts also by: Radim Kolar <hsn@netmag.cz>, thompsa, Marcus Grando <marcus@corp.grupos.com.br> Approved by: maintainer timeout (2 months on oldest PR)
Diffstat (limited to 'mail/dbmail-devel/files/patch-2.0.4_bug216_header.c')
-rw-r--r--mail/dbmail-devel/files/patch-2.0.4_bug216_header.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/mail/dbmail-devel/files/patch-2.0.4_bug216_header.c b/mail/dbmail-devel/files/patch-2.0.4_bug216_header.c
new file mode 100644
index 000000000000..d9610a5cd609
--- /dev/null
+++ b/mail/dbmail-devel/files/patch-2.0.4_bug216_header.c
@@ -0,0 +1,37 @@
+Index: header.c
+===================================================================
+--- header.c (revision 1796)
++++ header.c (revision 1813)
+@@ -176,15 +176,17 @@
+ if (message_content[line_content_size] == '\n') {
+ tmp_line_size = line_content_size + 1;
+ tmp_line_rfcsize = tmp_line_size + 1;
+- } else {
+- if (message_content[line_content_size] == '\r' &&
+- message_content[line_content_size + 1] == '\n') {
++ } else if (message_content[line_content_size] == '\r') {
++ if (message_content[line_content_size + 1] == '\n') {
++ /* This is the right behaviour */
+ tmp_line_size = line_content_size + 2;
+ tmp_line_rfcsize = tmp_line_size;
+ } else {
+- trace(TRACE_ERROR, "%s,%s: error reading header line",
+- __FILE__, __func__);
+- return -1;
++ /* This is broken behaviour, but it's better
++ * than not handling it at all.
++ */
++ tmp_line_size = line_content_size + 1;
++ tmp_line_rfcsize = tmp_line_size + 1;
+ }
+ }
+ }
+@@ -197,7 +199,6 @@
+ __FILE__, __func__);
+ return 0;
+ }
+- else
+- return 1;
++ return 1;
+
+ }