diff options
Diffstat (limited to 'test/lua/unit/utf.lua')
-rw-r--r-- | test/lua/unit/utf.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lua/unit/utf.lua b/test/lua/unit/utf.lua index 27988f918..e22eb2a2f 100644 --- a/test/lua/unit/utf.lua +++ b/test/lua/unit/utf.lua @@ -14,7 +14,7 @@ context("UTF8 check functions", function() } for _,c in ipairs(cases) do - local buf = ffi.new("char[?]", #c[1]) + local buf = ffi.new("char[?]", #c[1] + 1) ffi.copy(buf, c[1]) ffi.C.rspamd_str_lc_utf8(buf, #c[1]) local s = ffi.string(buf) @@ -30,7 +30,7 @@ context("UTF8 check functions", function() } for _,c in ipairs(cases) do - local buf = ffi.new("char[?]", #c[1]) + local buf = ffi.new("char[?]", #c[1] + 1) ffi.copy(buf, c[1]) ffi.C.rspamd_str_lc(buf, #c[1]) local s = ffi.string(buf) |