[exim-cvs] cvs commit: exim/exim-src/src dkim.c

Etusivu
Poista viesti
Vastaa
Lähettäjä: Tom Kistner
Päiväys:  
Vastaanottaja: exim-cvs
Aihe: [exim-cvs] cvs commit: exim/exim-src/src dkim.c
tom 2009/10/15 16:44:51 BST

  Modified files:
    exim-src/src         dkim.c 
  Log:
  Make sure dkim_signers is properly terminated


  Revision  Changes    Path
  1.7       +6 -4      exim/exim-src/src/dkim.c


  Index: dkim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/dkim.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- dkim.c    15 Oct 2009 08:27:37 -0000    1.6
  +++ dkim.c    15 Oct 2009 15:44:51 -0000    1.7
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/dkim.c,v 1.6 2009/10/15 08:27:37 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/dkim.c,v 1.7 2009/10/15 15:44:51 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -201,10 +201,12 @@
       sig = sig->next;
     }


  -  /* Chop the last colon from the domain list */
  -  if ((dkim_signers != NULL) &&
  -      (Ustrlen(dkim_signers) > 0))
  -    dkim_signers[Ustrlen(dkim_signers)-1] = '\0';
  +  /* NULL-terminate and chop the last colon from the domain list */
  +  if (dkim_signers != NULL) {
  +    dkim_signers[dkim_signers_ptr] = '\0';
  +    if (Ustrlen(dkim_signers) > 0)
  +      dkim_signers[Ustrlen(dkim_signers)-1] = '\0';
  +  }
   }