]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add one more boundary check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Jun 2020 16:09:41 +0000 (17:09 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Jun 2020 16:09:41 +0000 (17:09 +0100)
src/libserver/html.c

index 16f108ecf01089c3ae96db305f4891257ab90e37..37c8858bd72d756aacbb996504e39ae2fd21c95c 100644 (file)
@@ -368,7 +368,7 @@ rspamd_html_decode_entitles_inplace (gchar *s, gsize len)
 
        end = s + l;
 
-       while (h - s < l) {
+       while (h - s < l && t <= h) {
                switch (state) {
                /* Out of entity */
                case 0: