diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-08-29 18:52:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 18:52:23 +0200 |
commit | 9a3c8f64a77742684e847221990a06ad87c03985 (patch) | |
tree | 1ec4d83d66d824fe78e543e50db4e30c821da731 /src | |
parent | 59baa5e8a1f9e71b82f28c2723ccc558370b6fc0 (diff) | |
parent | 176bfea1356bd151a8aaef61e02ac5a175969a59 (diff) | |
download | rneovim-9a3c8f64a77742684e847221990a06ad87c03985.tar.gz rneovim-9a3c8f64a77742684e847221990a06ad87c03985.tar.bz2 rneovim-9a3c8f64a77742684e847221990a06ad87c03985.zip |
Merge pull request #26950 from bfredl/s390x_fix
fix issues with s390x CI on master (xdiff and others)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/lua/xdiff.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |