commit 53a504c: [Fix] Fix stack smashing

Vsevolod Stakhov vsevolod at rspamd.com
Sat Jul 23 19:42:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-07-23 20:35:50 +0100
URL: https://github.com/rspamd/rspamd/commit/53a504c97fd62d4a24efbad05395e878fd1dd0e5 (HEAD -> master)

[Fix] Fix stack smashing

---
 src/rspamd_proxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 33906e31c..3bc5062c8 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1012,7 +1012,7 @@ proxy_call_cmp_script (struct rspamd_proxy_session *session, gint cbref)
 	}
 
 	gchar log_tag[RSPAMD_LOG_ID_LEN + 1];
-	rspamd_strlcpy(log_tag, session->pool->tag.uid, sizeof (session->pool->tag.uid));
+	rspamd_strlcpy(log_tag, session->pool->tag.uid, sizeof(log_tag));
 	lua_pushstring(L, log_tag);
 
 	if (lua_pcall (L, 2, 0, err_idx) != 0) {


More information about the Commits mailing list