summaryrefslogtreecommitdiff
path: root/lang/ruby18/files/patch-parse.c
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2008-06-25 23:00:28 +0000
committerStanislav Sedov <stas@FreeBSD.org>2008-06-25 23:00:28 +0000
commit5027cd7b724add7e71ec509036fec9a49a0dd84c (patch)
treeaed855c29eb57ccf72df82f85cf43b357813ec4c /lang/ruby18/files/patch-parse.c
parentThis conversion script is no longer useful (diff)
- Add a couple of other patches from ruby SVN repo:
* fix integer overflow in bignums; * correctly check for string length in regexps; * fix memory leak in parse.c. - Bump portrevision.
Notes
Notes: svn path=/head/; revision=215782
Diffstat (limited to 'lang/ruby18/files/patch-parse.c')
-rw-r--r--lang/ruby18/files/patch-parse.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lang/ruby18/files/patch-parse.c b/lang/ruby18/files/patch-parse.c
new file mode 100644
index 000000000000..ae35f9f316ac
--- /dev/null
+++ b/lang/ruby18/files/patch-parse.c
@@ -0,0 +1,19 @@
+--- parse.c.orig 2008-06-26 01:19:07.000000000 +0400
++++ parse.c 2008-06-26 01:20:12.000000000 +0400
+@@ -10705,7 +10705,7 @@
+ rb_mem_clear(vars+i, len-i);
+ }
+ else {
+- *vars++ = (VALUE)ruby_scope;
++ *vars++ = 0;
+ rb_mem_clear(vars, len);
+ }
+ ruby_scope->local_vars = vars;
+@@ -10721,6 +10721,7 @@
+ if (!(ruby_scope->flags & SCOPE_CLONE))
+ xfree(ruby_scope->local_tbl);
+ }
++ ruby_scope->local_vars[-1] = 0; /* no reference needed */
+ ruby_scope->local_tbl = local_tbl();
+ }
+ }