[luatex] [PATCH] Make require return an error for ffi without shell-escape
luigi scarso
luigi.scarso at gmail.com
Wed Apr 13 10:25:36 CEST 2022
On Tue, Apr 12, 2022 at 8:48 PM Henri Menke via luatex <luatex at tug.org>
wrote:
> This change will make require("ffi") fail with an error by default, which
> is
> generally better than returning an unusable ffi table. Third-party
> libraries
> usually expect a working ffi table to be available after require("ffi").
> That
> promise was broken by the previous behavior.
> ---
> source/texk/web2c/luatexdir/lua/luatex-core.lua | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/source/texk/web2c/luatexdir/lua/luatex-core.lua
> b/source/texk/web2c/luatexdir/lua/luatex-core.lua
> index 51cfa518d..730f0c812 100644
> --- a/source/texk/web2c/luatexdir/lua/luatex-core.lua
> +++ b/source/texk/web2c/luatexdir/lua/luatex-core.lua
> @@ -212,6 +212,8 @@ if saferoption == 1 or shellescape ~= 1 then
> end
>
> ffi = nil
> + package.loaded.ffi = nil
> + package.preload.ffi = error
>
> end
>
> --
> 2.33.1
>
>
Committed revision 7520.
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20220413/c989ebf2/attachment.html>
More information about the luatex
mailing list.