From: Victor Julien Date: Thu, 30 Oct 2014 17:23:15 +0000 (+0100) Subject: mime: fix output issues X-Git-Tag: suricata-2.1beta2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1195%2Fhead;p=thirdparty%2Fsuricata.git mime: fix output issues When multiple email addresses were in the 'to' field, sometimes they would be logged as "\r\n \"Name\" ". The \r\n was added by GetFullValue in the mime decoder, for unknown reasons. Disabling this seems to have no drawbacks. --- diff --git a/src/util-decode-mime.c b/src/util-decode-mime.c index 4e3035bb38..187740ea87 100644 --- a/src/util-decode-mime.c +++ b/src/util-decode-mime.c @@ -608,10 +608,12 @@ static uint8_t * GetFullValue(DataValue *dv, uint32_t *len) while (curr != NULL) { *len += curr->value_len; +#if 0 /* Add CRLF except on last one */ if (curr->next != NULL) { *len += 2; } +#endif curr = curr->next; } @@ -629,11 +631,13 @@ static uint8_t * GetFullValue(DataValue *dv, uint32_t *len) memcpy(val + offset, curr->value, curr->value_len); offset += curr->value_len; +#if 0 /* VJ unclear why this is needed ? */ /* Add CRLF except on last one */ if (curr->next != NULL) { memcpy(val + offset, CRLF, 2); offset += 2; } +#endif curr = curr->next; } }