about summary refs log tree commit diff
path: root/pkgs/development/interpreters/lua-5/CVE-2022-28805.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/lua-5/CVE-2022-28805.patch')
-rw-r--r--pkgs/development/interpreters/lua-5/CVE-2022-28805.patch10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/lua-5/CVE-2022-28805.patch b/pkgs/development/interpreters/lua-5/CVE-2022-28805.patch
new file mode 100644
index 0000000000000..bcf16acbea422
--- /dev/null
+++ b/pkgs/development/interpreters/lua-5/CVE-2022-28805.patch
@@ -0,0 +1,10 @@
+--- a/src/lparser.c
++++ b/src/lparser.c
+@@ -301,6 +301,7 @@
+     expdesc key;
+     singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
+     lua_assert(var->k == VLOCAL || var->k == VUPVAL);
++    luaK_exp2anyregup(fs, var);  /* but could be a constant */
+     codestring(ls, &key, varname);  /* key is variable name */
+     luaK_indexed(fs, var, &key);  /* env[varname] */
+   }