diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-10 16:01:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-10 16:01:51 +0100 |
commit | 28946b7ecf5de3b5817f8ec85981bd8d28dfe41d (patch) | |
tree | 8b598bebc1709c64608a46c03a5e991a08f8a551 /src/libserver/html.c | |
parent | 012c6f9849c7476db985dffcaebf364ffea03224 (diff) | |
download | rspamd-28946b7ecf5de3b5817f8ec85981bd8d28dfe41d.tar.gz rspamd-28946b7ecf5de3b5817f8ec85981bd8d28dfe41d.zip |
Fix index calculation.
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r-- | src/libserver/html.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index 96380a3ef..e68c73c8c 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1892,7 +1892,7 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc, cur_tag->id == Tag_HR || cur_tag->id == Tag_TR || cur_tag->id == Tag_DIV) && balanced) { /* Insert newline */ - if (dest->data[dest->len - 1] != '\n') { + if (dest->len > 0 && dest->data[dest->len - 1] != '\n') { g_byte_array_append (dest, "\r\n", 2); } save_space = FALSE; |