From bb11eb7bb254db984de4106fdefb94763e18aa94 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 20 Jun 2019 12:37:40 +0100 Subject: [PATCH] [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)]; -- 2.39.5