summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-14 05:24:05 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-14 05:24:05 (GMT)
commitc70a79c1e2deec8d508f34776befe11dab701e49 (patch)
treee316035b1059e5e4c3985fa64e7a3fa98ad697db /abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff
parentc7d4d0ec62e50c879908ab9f5e6b82c59124d338 (diff)
downloadlinhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.zip
linhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.tar.gz
linhes_pkgbuild-c70a79c1e2deec8d508f34776befe11dab701e49.tar.bz2
Adding missing PKGBUILDS, needed for VLC.
fluidsynth libdvbpsi libmatroska libmodplug libmpcded libshout libv4l lua zvbi
Diffstat (limited to 'abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff')
-rw-r--r--abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff18
1 files changed, 18 insertions, 0 deletions
diff --git a/abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff b/abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff
new file mode 100644
index 0000000..1d03f37
--- /dev/null
+++ b/abs/extra-testing/community/lua/lua-5.1.3-official-patch4.diff
@@ -0,0 +1,18 @@
+--- src/lbaselib.c (old)
++++ src/lbaselib.c (new)
+@@ -344,10 +344,12 @@
+ luaL_checktype(L, 1, LUA_TTABLE);
+ i = luaL_optint(L, 2, 1);
+ e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1));
++ if (i > e) return 0; /* empty range */
+ n = e - i + 1; /* number of elements */
+- if (n <= 0) return 0; /* empty range */
+- luaL_checkstack(L, n, "table too big to unpack");
+- for (; i<=e; i++) /* push arg[i...e] */
++ if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */
++ return luaL_error(L, "too many results to unpack");
++ lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */
++ while (i++ < e) /* push arg[i + 1...e] */
+ lua_rawgeti(L, 1, i);
+ return n;
+ }