[exim-dev] [Bug 2274] exim 4.91: segfault ... error 4 in li…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: admin
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 2274] exim 4.91: segfault ... error 4 in libc-2.17.so
https://bugs.exim.org/show_bug.cgi?id=2274

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???


--- Comment #21 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/675ae646c0506f6740bb8afa28c8c4892dabbdaf

commit 675ae646c0506f6740bb8afa28c8c4892dabbdaf
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Jun 6 10:41:51 2018 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Wed Jun 6 10:43:18 2018 +0100


    Fix logging of cmdline args when starting in an unlinked cwd.  Bug 2274
---
 src/src/exim.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)


diff --git a/src/src/exim.c b/src/src/exim.c
index 810550d..9f6efaf 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -4083,18 +4083,23 @@ a debugging feature for finding out what arguments
certain MUAs actually use.
Don't attempt it if logging is disabled, or if listing variables or if
verifying/testing addresses or expansions. */

-if (((debug_selector & D_any) != 0 || LOGGING(arguments))
+if (  (debug_selector & D_any  ||  LOGGING(arguments))
       && really_exim && !list_options && !checking)
   {
   int i;
   uschar *p = big_buffer;
   Ustrcpy(p, "cwd= (failed)");


-  Ustrncpy(p + 4, initial_cwd, big_buffer_size-5);
-  p += 4 + Ustrlen(initial_cwd);
-  /* in case p is near the end and we don't provide enough space for
-   * string_format to be willing to write. */
-  *p = '\0';
+  if (!initial_cwd)
+    p += 13;
+  else
+    {
+    Ustrncpy(p + 4, initial_cwd, big_buffer_size-5);
+    p += 4 + Ustrlen(initial_cwd);
+    /* in case p is near the end and we don't provide enough space for
+     * string_format to be willing to write. */
+    *p = '\0';
+    }


(void)string_format(p, big_buffer_size - (p - big_buffer), " %d args:",
argc);
while (*p) p++;

--
You are receiving this mail because:
You are on the CC list for the bug.