commit 3c22e31: [Minor] Fix strlcpy usage
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu May 27 17:00:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-05-27 17:57:02 +0100
URL: https://github.com/rspamd/rspamd/commit/3c22e3145c2384dcc125416ba222317834043e43 (HEAD -> master)
[Minor] Fix strlcpy usage
---
src/libserver/html/html.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index cfafbf736..15865533a 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -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);
More information about the Commits
mailing list