CamelMimeFilterPgp: Ignore right side white spaces
authorMilan Crha <mcrha@redhat.com>
Thu, 10 Jan 2013 19:27:12 +0000 (20:27 +0100)
committerMilan Crha <mcrha@redhat.com>
Thu, 10 Jan 2013 19:27:50 +0000 (20:27 +0100)
camel/camel-mime-filter-pgp.c

index a85e734..7013391 100644 (file)
@@ -31,6 +31,7 @@
 #include <string.h>
 
 #include "camel-mime-filter-pgp.h"
+#include "camel-mime-utils.h"
 
 #define CAMEL_MIME_FILTER_PGP_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
@@ -103,6 +104,9 @@ mime_filter_pgp_run (CamelMimeFilter *mime_filter,
                if (len > 0 && inptr[-1] == '\r')
                        len--;
 
+               while (len > 0 && camel_mime_is_lwsp (start[len - 1]))
+                       len--;
+
                inptr++;
 
                switch (priv->state) {