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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Tom Kistner
Datum:  
To: exim-cvs
Betreff: [exim-cvs] cvs commit: exim/exim-src/src/pdkim pdkim.c
tom 2009/10/29 11:08:01 GMT

  Modified files:
    exim-src/src/pdkim   pdkim.c 
  Log:
  Fix bug in relaxed body canon.


  Revision  Changes    Path
  1.6       +4 -1      exim/exim-src/src/pdkim/pdkim.c


  Index: pdkim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/pdkim/pdkim.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- pdkim.c    29 Oct 2009 10:12:28 -0000    1.5
  +++ pdkim.c    29 Oct 2009 11:08:01 -0000    1.6
  @@ -20,7 +20,7 @@
    *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    */


-/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.5 2009/10/29 10:12:28 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.6 2009/10/29 11:08:01 tom Exp $ */

   #include <stdlib.h>
   #include <stdio.h>
  @@ -864,7 +864,10 @@
           if (relaxed_data == NULL) return PDKIM_ERR_OOM;
           while (*p != '\0') {
             char c = *p;
  -          if ( (c == '\t') || (c == ' ') ) {
  +          if (c == '\r') {
  +            if ( (q > 0) && (relaxed_data[q-1] == ' ') ) q--;
  +          }
  +          else if ( (c == '\t') || (c == ' ') ) {
               c = ' '; /* Turns WSP into SP */
               if (seen_wsp) {
                 p++;