From ccf4d72dd2d079edec505af196b1047808f5dae0 Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 13 Aug 2014 15:09:24 +0200 Subject: [PATCH] boundary parser fix in the binaries --- src/config.h | 2 +- src/parser_utils.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config.h b/src/config.h index 61eb034c..bab336f6 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,7 @@ #define VERSION "1.1.0-rc4" -#define BUILD 882 +#define BUILD 883 #define HOSTID "mailarchiver" diff --git a/src/parser_utils.c b/src/parser_utils.c index aa0dce38..cedaae02 100644 --- a/src/parser_utils.c +++ b/src/parser_utils.c @@ -275,7 +275,7 @@ int isHexNumber(char *p){ int extract_boundary(char *p, struct _state *state){ - char *q; + char *q, *q2; p += strlen("boundary"); @@ -301,6 +301,10 @@ int extract_boundary(char *p, struct _state *state){ if(isspace(*p) == 0) break; } + + q2 = strchr(p, ';'); + if(q2) *q2 = '\0'; + q = strrchr(p, '"'); if(q) *q = '\0'; @@ -312,6 +316,8 @@ int extract_boundary(char *p, struct _state *state){ addnode(state->boundaries, p); + if(q2) *q2 = ';'; + return 1; }