summaryrefslogtreecommitdiffstats
path: root/lua-5.3.3-upstream-bug-2.patch
diff options
context:
space:
mode:
authorTom Callaway <spot@fedoraproject.org>2016-07-25 16:08:19 -0400
committerTom Callaway <spot@fedoraproject.org>2016-07-25 16:08:19 -0400
commit19e01a142e9ab983055b2f4cdb5490a99fbd3149 (patch)
tree1eb82335ad331e95bf86e18a8d64280a12d5e394 /lua-5.3.3-upstream-bug-2.patch
parentd6b7c55828c8f5965fd861cf6558493377f2fa1a (diff)
downloadlua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.tar.gz
lua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.tar.xz
lua-19e01a142e9ab983055b2f4cdb5490a99fbd3149.zip
apply upstream fixes for bug 1 & 2
Diffstat (limited to 'lua-5.3.3-upstream-bug-2.patch')
-rw-r--r--lua-5.3.3-upstream-bug-2.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua-5.3.3-upstream-bug-2.patch b/lua-5.3.3-upstream-bug-2.patch
new file mode 100644
index 0000000..96cf85a
--- /dev/null
+++ b/lua-5.3.3-upstream-bug-2.patch
@@ -0,0 +1,13 @@
+diff -up lua-5.3.3/src/loslib.c.readpast lua-5.3.3/src/loslib.c
+--- lua-5.3.3/src/loslib.c.readpast 2016-07-25 16:04:13.916465061 -0400
++++ lua-5.3.3/src/loslib.c 2016-07-25 16:04:19.756423878 -0400
+@@ -260,7 +260,8 @@ static int getfield (lua_State *L, const
+ static const char *checkoption (lua_State *L, const char *conv, char *buff) {
+ const char *option;
+ int oplen = 1;
+- for (option = LUA_STRFTIMEOPTIONS; *option != '\0'; option += oplen) {
++ int convlen = (int)strlen(conv);
++ for (option = LUA_STRFTIMEOPTIONS; *option != '\0' && oplen <= convlen; option += oplen) {
+ if (*option == '|') /* next block? */
+ oplen++; /* next length */
+ else if (memcmp(conv, option, oplen) == 0) { /* match? */