commit bb11eb7: [Fix] Fix out of bound access in lua logger

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jun 21 11:42:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-06-20 12:37:40 +0100
URL: https://github.com/rspamd/rspamd/commit/bb11eb7bb254db984de4106fdefb94763e18aa94

[Fix] Fix out of bound access in lua logger

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

diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c
index 60c702e65..bca4bc6e3 100644
--- a/src/lua/lua_logger.c
+++ b/src/lua/lua_logger.c
@@ -326,7 +326,7 @@ lua_logger_out_str (lua_State *L, gint pos,
 			s = 0;
 
 			while (slen > 0 && len > 1) {
-				if (!lua_logger_char_safe (str[r], esc_type)) {
+				if (!lua_logger_char_safe (str[s], esc_type)) {
 					if (len >= 3) {
 						outbuf[r++] = '\\';
 						outbuf[r++] = hexdigests[((str[s] >> 4) & 0xF)];


More information about the Commits mailing list