tom 2009/04/09 15:47:50 BST
Modified files: (Branch: DEVEL_PDKIM)
exim-src/src/pdkim pdkim.c
Log:
Fix signature parsing
Revision Changes Path
1.1.2.10 +7 -5 exim/exim-src/src/pdkim/pdkim.c
Index: pdkim.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/pdkim/Attic/pdkim.c,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- pdkim.c 9 Apr 2009 07:49:11 -0000 1.1.2.9
+++ pdkim.c 9 Apr 2009 14:47:50 -0000 1.1.2.10
@@ -20,7 +20,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.1.2.9 2009/04/09 07:49:11 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.1.2.10 2009/04/09 14:47:50 tom Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -498,7 +498,7 @@
p = raw_hdr;
q = sig->rawsig_no_b_val;
- while (*p != '\0') {
+ while (1) {
/* Ignore FWS */
if ( (*p == '\r') || (*p == '\n') )
@@ -539,10 +539,10 @@
if (cur_val == NULL)
cur_val = pdkim_strnew(NULL);
- if ( (*p == '\r') || (*p == '\n') )
+ if ( (*p == '\r') || (*p == '\n') || (*p == ' ') || (*p == '\t') )
goto NEXT_CHAR;
- if (*p == ';') {
+ if ( (*p == ';') || (*p == '\0') ) {
if (cur_tag->len > 0) {
pdkim_strtrim(cur_val);
#ifdef PDKIM_DEBUG
@@ -640,6 +640,7 @@
}
NEXT_CHAR:
+ if (*p == '\0') break;
if (!in_b_val) {
*q = *p;
@@ -710,7 +711,7 @@
p = raw_record;
- while (*p != '\0') {
+ while (1) {
/* Ignore FWS */
if ( (*p == '\r') || (*p == '\n') )
@@ -744,7 +745,7 @@
if ( (*p == '\r') || (*p == '\n') )
goto NEXT_CHAR;
- if (*p == ';') {
+ if ( (*p == ';') || (*p == '\0') ) {
if (cur_tag->len > 0) {
pdkim_strtrim(cur_val);
#ifdef PDKIM_DEBUG
@@ -797,6 +798,7 @@
}
NEXT_CHAR:
+ if (*p == '\0') break;
p++;
}