]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mime: fix output issues 1195/head
authorVictor Julien <victor@inliniac.net>
Thu, 30 Oct 2014 17:23:15 +0000 (18:23 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 30 Oct 2014 17:23:15 +0000 (18:23 +0100)
When multiple email addresses were in the 'to' field, sometimes
they would be logged as "\r\n \"Name\" <email>".

The \r\n was added by GetFullValue in the mime decoder, for unknown
reasons. Disabling this seems to have no drawbacks.

src/util-decode-mime.c

index 4e3035bb38f1867ccde6a606a2a933102addf47c..187740ea874baa138809ec6029b9935dc94a0d6c 100644 (file)
@@ -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;
         }
     }