From 176bfea1356bd151a8aaef61e02ac5a175969a59 Mon Sep 17 00:00:00 2001 From: bfredl Date: Mon, 8 Jan 2024 14:34:49 +0100 Subject: fix(build): issues with s390x CI Does not fix everything, but at least let's test run to finish before timeout --- src/nvim/lua/xdiff.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/lua/xdiff.c b/src/nvim/lua/xdiff.c index 035c171a14..8d791a7e74 100644 --- a/src/nvim/lua/xdiff.c +++ b/src/nvim/lua/xdiff.c @@ -185,7 +185,12 @@ static mmfile_t get_string_arg(lua_State *lstate, int idx) luaL_argerror(lstate, idx, "expected string"); } mmfile_t mf; - mf.ptr = (char *)lua_tolstring(lstate, idx, (size_t *)&mf.size); + size_t size; + mf.ptr = (char *)lua_tolstring(lstate, idx, &size); + if (size > INT_MAX) { + luaL_argerror(lstate, idx, "string too long"); + } + mf.size = (int)size; return mf; } -- cgit