From: Vsevolod Stakhov Date: Thu, 20 Jun 2019 11:37:40 +0000 (+0100) Subject: [Fix] Fix out of bound access in lua logger X-Git-Tag: 2.0~759 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb11eb7bb254db984de4106fdefb94763e18aa94;p=rspamd.git [Fix] Fix out of bound access in lua logger --- 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)];