]> source.dussan.org Git - rspamd.git/commitdiff
Apply boundary fix for dkim simple canonization.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Nov 2014 14:27:35 +0000 (14:27 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Nov 2014 14:27:35 +0000 (14:27 +0000)
src/libserver/dkim.c

index 112de7cd224f5b8ca032b9776140f86f5997b9ba..b8b92700b791610294877843e3bbad795f73ea6d 100644 (file)
@@ -1169,6 +1169,14 @@ rspamd_dkim_simple_body_step (GChecksum *ck, const gchar **start, guint size,
                                len--;
                                continue;
                        }
+                       else if (inlen < 2) {
+                               /*
+                                * Inlen is too small to continue, hence we need more iteration to
+                                * avoid splitted \r\n
+                                */
+                               finished = FALSE;
+                               break;
+                       }
                }
                *t++ = *h++;
                inlen--;