[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-13 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

Jeremy Harris  changed:

   What|Removed |Added

 Status|WAIT_FIX_CONFIRMATION   |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jeremy Harris  ---
Verified by reporter (thanks!)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-13 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

--- Comment #6 from Tim Stewart  ---
I ran the latest version through my testing and all looks well.

Thanks again!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-11 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

--- Comment #5 from Git Commit  ---
Git commit:
https://git.exim.org/exim.git/commitdiff/d16931c81f3e500fa6eafe5ec1c5d8e7db63e65a

commit d16931c81f3e500fa6eafe5ec1c5d8e7db63e65a
Author: Jeremy Harris 
AuthorDate: Sat Aug 11 14:45:42 2018 +0100
Commit: Jeremy Harris 
CommitDate: Sat Aug 11 14:45:42 2018 +0100

Fix logging all_parents for cutthrough delivery.  Bug 2296
---
 src/src/verify.c | 2 +-
 test/confs/5400  | 2 +-
 test/log/5408| 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/src/verify.c b/src/src/verify.c
index 6411899..c92ef65 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -1101,7 +1101,7 @@ no_conn:
   cutthrough.addr.host_used = 
   for (caddr = , parent = addr->parent;
parent;
-   parent = parent->parent)
+   caddr = caddr->parent, parent = parent->parent)
 *(caddr->parent = store_get(sizeof(address_item))) = *parent;

   ctblock.buffer = ctbuffer;
diff --git a/test/confs/5400 b/test/confs/5400
index ad48ebd..980e02a 100644
--- a/test/confs/5400
+++ b/test/confs/5400
@@ -10,7 +10,7 @@ OPT=

 primary_hostname = myhost.test.ex

-log_selector = +received_recipients
+log_selector = +received_recipients +all_parents
 queue_only

 # - Main settings -
diff --git a/test/log/5408 b/test/log/5408
index 2b367ac..99fead1 100644
--- a/test/log/5408
+++ b/test/log/5408
@@ -8,10 +8,10 @@
 1999-03-02 09:44:33 10HmaY-0005vi-00 <= cal...@myhost.test.ex U=CALLER
P=local-esmtp S=sss for rus...@domain.com
 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
 1999-03-02 09:44:33 rcpt for rrus...@domain.com
-1999-03-02 09:44:33 10HmaZ-0005vi-00 >> us...@domain.com 
R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 >> us...@domain.com (rus...@domain.com)
 R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= cal...@myhost.test.ex U=CALLER
P=local-esmtp S=sss for rrus...@domain.com
 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
 1999-03-02 09:44:33 rcpt for rrrus...@domain.com
-1999-03-02 09:44:33 10HmbA-0005vi-00 >> us...@domain.com 
R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbA-0005vi-00 >> us...@domain.com (rus...@domain.com,
rrus...@domain.com)  R=all T=smtp H=127.0.0.1 [127.0.0.1]
C="250 OK"
 1999-03-02 09:44:33 10HmbA-0005vi-00 <= cal...@myhost.test.ex U=CALLER
P=local-esmtp S=sss for rrrus...@domain.com
 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-10 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

--- Comment #3 from Tim Stewart  ---
Thanks for the quick turnaround!

This patch fixes the crash/corrupt log data for me.  However, it appears to
only preserve the first and last entries in the redirection list even though it
allocates memory for each element in the list.  Did you actually mean for the
loop to look like the following?

  for (caddr = , parent = addr->parent;
   parent;
   parent = parent->parent) {
*(caddr->parent = store_get(sizeof(address_item))) = *parent;
caddr = caddr->parent;
  }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-09 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

--- Comment #2 from Jeremy Harris  ---
The testcase in the above commit merrily crashes post-delivery, presumably
somewhere around logging the delivery (at least, once the subsidiary bug
of dropping a live $parent_local_part ref was fixed).  With the deep-copy
of parents added in, it does not.   However, I have not gone so far as to try
the gdb script (but thanks for preparing it!)

Tim: Could you drop your workaround and try this with your use-case?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-09 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

Jeremy Harris  changed:

   What|Removed |Added

 Status|ASSIGNED|WAIT_FIX_CONFIRMATION

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-09 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

Git Commit  changed:

   What|Removed |Added

 CC||g...@exim.org

--- Comment #1 from Git Commit  ---
Git commit:
https://git.exim.org/exim.git/commitdiff/8a6b4e02cd384193a5566e8601bdd97249b22284

commit 8a6b4e02cd384193a5566e8601bdd97249b22284
Author: Jeremy Harris 
AuthorDate: Thu Aug 9 20:37:42 2018 +0100
Commit: Jeremy Harris 
CommitDate: Thu Aug 9 21:19:17 2018 +0100

fix cutthrough delivery for more than one iteration of address redirection.
 bug 2296

 doc/doc-txt/ChangeLog |   5 ++
 src/src/verify.c  |  19 +--
 test/confs/5400   |   5 ++
 test/confs/5408   |   1 +
 test/log/5408 |  17 ++
 test/scripts/5400-cutthrough/5408 | 115 ++
 6 files changed, 157 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##


[exim-dev] [Bug 2296] Crash when > 1 address redirections used with cutthrough

2018-08-09 Thread admin--- via Exim-dev
https://bugs.exim.org/show_bug.cgi?id=2296

Jeremy Harris  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|ni...@exim.org  |jgh146...@wizmail.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##