]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix element added
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Jun 2017 23:02:32 +0000 (00:02 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Jun 2017 23:02:32 +0000 (00:02 +0100)
src/libmime/message.c

index b2d37890cf15c90214072161bcad7186207dc3d8..43b3fcffd9fd63dc17899619ac98d998a77684c0 100644 (file)
@@ -419,7 +419,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
                                        }
 
                                        g_ptr_array_add (part->newlines,
-                                                       (((gpointer) (goffset) (part->stripped_content))));
+                                                       (((gpointer) (goffset) (part->stripped_content->len))));
                                }
 
                                c = p + 1;
@@ -433,7 +433,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
                                                        (const guint8 *)" ", 1);
                                        crlf_added = TRUE;
                                        g_ptr_array_add (part->newlines,
-                                                       (((gpointer) (goffset) (part->stripped_content))));
+                                                       (((gpointer) (goffset) (part->stripped_content->len))));
                                }
 
                                part->nlines++;
@@ -468,7 +468,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
                                break;
                        case seen_cr:
                        case seen_lf:
-                               part->newlines ++;
+                               part->nlines ++;
 
                                /* Skip initial spaces */
                                if (G_UNLIKELY (*p == ' ')) {
@@ -531,7 +531,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
                                g_byte_array_append (part->stripped_content,
                                                (const guint8 *)" ", 1);
                                g_ptr_array_add (part->newlines,
-                                               (((gpointer) (goffset) (part->stripped_content))));
+                                               (((gpointer) (goffset) (part->stripped_content->len))));
                        }
 
                        part->nlines++;