]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix strlcpy usage
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 27 May 2021 16:57:02 +0000 (17:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 27 May 2021 16:57:02 +0000 (17:57 +0100)
src/libserver/html/html.cxx

index cfafbf736a4606918588ed02984135fcaca45dd5..15865533a359fea0a32f2b4eddea9bd44311e87c 100644 (file)
@@ -356,7 +356,7 @@ parse_tag_content(rspamd_mempool_t *pool,
                                 * Copy tag name to the temporary buffer for modifications
                                 */
                                auto *s = rspamd_mempool_alloc_buffer(pool, tag->name.size() + 1);
-                               rspamd_strlcpy(s, tag->name.data(), tag->name.size());
+                               rspamd_strlcpy(s, tag->name.data(), tag->name.size() + 1);
                                auto nsize = rspamd_html_decode_entitles_inplace(s,
                                                tag->name.size());
                                nsize =  rspamd_str_lc_utf8(s, nsize);