[exim-cvs] Fix crash in queue-ramp

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] Fix crash in queue-ramp
Gitweb: https://git.exim.org/exim.git/commitdiff/ca8410e981982edd16bcc8689e09c2c15d8267e7
Commit:     ca8410e981982edd16bcc8689e09c2c15d8267e7
Parent:     75a647cb59e04896e04296c767763df72352a08e
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Mar 5 00:40:49 2023 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Mar 5 12:49:43 2023 +0000


    Fix crash in queue-ramp


    Broken-by: 1e835086d159
---
 src/src/daemon.c                                           | 5 ++++-
 test/scripts/0999-EXP-Queue-Ramp/REQUIRES                  | 1 -
 test/scripts/{0999-EXP-Queue-Ramp => 0999-Queue-Ramp}/0999 | 0
 test/scripts/0999-Queue-Ramp/REQUIRES                      | 1 +
 test/stderr/0999                                           | 4 ++--
 5 files changed, 7 insertions(+), 4 deletions(-)


diff --git a/src/src/daemon.c b/src/src/daemon.c
index b0533c28f..caed44bb3 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1344,7 +1344,10 @@ switch (buf[0])
     memcpy(queuerun_msgid, buf+1, MESSAGE_ID_LENGTH+1);


     for (qrunner * q = qrunners; q; q = q->next)
-      if (Ustrcmp(q->name, buf+1+MESSAGE_ID_LENGTH+1) == 0)
+      if (q->name
+      ? Ustrcmp(q->name, buf+1+MESSAGE_ID_LENGTH+1) == 0
+      : !buf[1+MESSAGE_ID_LENGTH+1]
+     )
     { queuerun_msg_qname = q->name; break; }
     return TRUE;
 #endif
diff --git a/test/scripts/0999-EXP-Queue-Ramp/REQUIRES b/test/scripts/0999-EXP-Queue-Ramp/REQUIRES
deleted file mode 100644
index bde27c376..000000000
--- a/test/scripts/0999-EXP-Queue-Ramp/REQUIRES
+++ /dev/null
@@ -1 +0,0 @@
-support Experimental_Queue_Ramp
diff --git a/test/scripts/0999-EXP-Queue-Ramp/0999 b/test/scripts/0999-Queue-Ramp/0999
similarity index 100%
rename from test/scripts/0999-EXP-Queue-Ramp/0999
rename to test/scripts/0999-Queue-Ramp/0999
diff --git a/test/scripts/0999-Queue-Ramp/REQUIRES b/test/scripts/0999-Queue-Ramp/REQUIRES
new file mode 100644
index 000000000..9a95f9b78
--- /dev/null
+++ b/test/scripts/0999-Queue-Ramp/REQUIRES
@@ -0,0 +1 @@
+support Queue_Ramp
diff --git a/test/stderr/0999 b/test/stderr/0999
index e958d86f4..d7d568b47 100644
--- a/test/stderr/0999
+++ b/test/stderr/0999
@@ -79,8 +79,8 @@
 2017-07-30 18:51:05.712 10HmdX-0005vi-00 no immediate delivery: queued by ACL
 2017-07-30 18:51:05.712 10HmdY-0005vi-00 no immediate delivery: queued by ACL
 2017-07-30 18:51:05.712 10HmdZ-0005vi-00 no immediate delivery: queued by ACL
-2017-07-30 18:51:05.712 Start queue run: pid=pppp -qq
-2017-07-30 18:51:05.712 End queue run: pid=pppp -qq
+2017-07-30 18:51:05.712 Start queue run: pid=p1234 -qq
+2017-07-30 18:51:05.712 End queue run: pid=p1234 -qq
 81 messages in
 2017-07-30 18:51:05.712 notify triggered queue run
 daemon did make at least one delivery