[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: exim-cvs
Betreff: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src deliver.c exim.h exim/exim-src/src/routers iplookup.c queryprogram.c redirect.c
ph10 2007/01/02 11:25:01 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         deliver.c exim.h 
    exim-src/src/routers iplookup.c queryprogram.c redirect.c 
  Log:
  Panic-die if a system filter or router generates more then 32767 child
  addresses.


  Revision  Changes    Path
  1.450     +7 -0      exim/exim-doc/doc-txt/ChangeLog
  1.39      +3 -0      exim/exim-src/src/deliver.c
  1.20      +8 -0      exim/exim-src/src/exim.h
  1.9       +3 -0      exim/exim-src/src/routers/iplookup.c
  1.9       +3 -0      exim/exim-src/src/routers/queryprogram.c
  1.19      +3 -0      exim/exim-src/src/routers/redirect.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.449
  retrieving revision 1.450
  diff -u -r1.449 -r1.450
  --- ChangeLog    24 Dec 2006 12:12:05 -0000    1.449
  +++ ChangeLog    2 Jan 2007 11:25:00 -0000    1.450
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.449 2006/12/24 12:12:05 magnus Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.450 2007/01/02 11:25:00 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -13,6 +13,13 @@
   MH/01 Don't check that the operands of numeric comparison operators are
         integers when their expansion is in "skipping" mode (fixes bug
         introduced by 4.64-PH/07).
  +
  +PH/01 If a system filter or a router generates more than SHRT_MAX (32767)
  +      child addresses, Exim now panics and dies. Previously, because the count
  +      is held in a short int, deliveries were likely to be lost. As such a
  +      large number of recipients for a single message is ridiculous
  +      (performance will be very, very poor), I have chosen to impose a limit
  +      rather than extend the field.



Exim version 4.64

  Index: deliver.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/deliver.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- deliver.c    6 Nov 2006 15:50:12 -0000    1.38
  +++ deliver.c    2 Jan 2007 11:25:00 -0000    1.39
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/deliver.c,v 1.38 2006/11/06 15:50:12 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/deliver.c,v 1.39 2007/01/02 11:25:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -4941,6 +4941,9 @@


       while (p != NULL)
         {
  +      if (parent->child_count == SHRT_MAX)
  +        log_write(0, LOG_MAIN|LOG_PANIC_DIE, "system filter generated more "
  +          "than %d delivery addresses", SHRT_MAX);
         parent->child_count++;
         p->parent = parent;



  Index: exim.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- exim.h    7 Feb 2006 11:19:00 -0000    1.19
  +++ exim.h    2 Jan 2007 11:25:00 -0000    1.20
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.h,v 1.19 2006/02/07 11:19:00 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.h,v 1.20 2007/01/02 11:25:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -73,6 +73,14 @@


#ifndef INT_MAX
#define INT_MAX 2147483647
+#endif
+
+#ifndef INT_MIN
+#define INT_MIN (-INT_MAX - 1)
+#endif
+
+#ifndef SHRT_MAX
+#define SHRT_MAX 32767
#endif

#ifndef UCHAR_MAX

  Index: iplookup.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/iplookup.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- iplookup.c    9 Oct 2006 14:36:25 -0000    1.8
  +++ iplookup.c    2 Jan 2007 11:25:00 -0000    1.9
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/iplookup.c,v 1.8 2006/10/09 14:36:25 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/iplookup.c,v 1.9 2007/01/02 11:25:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -378,6 +378,9 @@
   copyflag(new_addr, addr, af_propagate);
   new_addr->p = addr->p;


  +if (addr->child_count == SHRT_MAX)
  +  log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s router generated more than %d "
  +    "child addresses for <%s>", rblock->name, SHRT_MAX, addr->address);
   addr->child_count++;
   new_addr->next = *addr_new;
   *addr_new = new_addr;


  Index: queryprogram.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/queryprogram.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- queryprogram.c    7 Feb 2006 14:05:17 -0000    1.8
  +++ queryprogram.c    2 Jan 2007 11:25:00 -0000    1.9
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/queryprogram.c,v 1.8 2006/02/07 14:05:17 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/queryprogram.c,v 1.9 2007/01/02 11:25:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -122,6 +122,9 @@
     next->next = *addr_new;
     *addr_new = next;


  +  if (addr->child_count == SHRT_MAX)
  +    log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s router generated more than %d "
  +      "child addresses for <%s>", rblock->name, SHRT_MAX, addr->address);
     addr->child_count++;


     DEBUG(D_route)


  Index: redirect.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/redirect.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- redirect.c    20 Nov 2006 11:43:40 -0000    1.18
  +++ redirect.c    2 Jan 2007 11:25:00 -0000    1.19
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/redirect.c,v 1.18 2006/11/20 11:43:40 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/redirect.c,v 1.19 2007/01/02 11:25:00 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -334,6 +334,9 @@
     next->parent = addr;
     orflag(next, addr, af_ignore_error);
     next->start_router = rblock->redirect_router;
  +  if (addr->child_count == SHRT_MAX)
  +    log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s router generated more than %d "
  +      "child addresses for <%s>", rblock->name, SHRT_MAX, addr->address);
     addr->child_count++;


     next->next = *addr_new;