From 5027cd7b724add7e71ec509036fec9a49a0dd84c Mon Sep 17 00:00:00 2001 From: Stanislav Sedov Date: Wed, 25 Jun 2008 23:00:28 +0000 Subject: - 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. --- lang/ruby18/files/patch-regex.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lang/ruby18/files/patch-regex.c (limited to 'lang/ruby18/files/patch-regex.c') diff --git a/lang/ruby18/files/patch-regex.c b/lang/ruby18/files/patch-regex.c new file mode 100644 index 000000000000..16451e45807e --- /dev/null +++ b/lang/ruby18/files/patch-regex.c @@ -0,0 +1,14 @@ +--- regex.c.orig 2008-06-26 01:17:14.000000000 +0400 ++++ regex.c 2008-06-26 01:18:42.000000000 +0400 +@@ -3169,6 +3169,11 @@ + if (startpos < 0 || startpos > size) + return -1; + ++ if (!string) { ++ if (size == 0) string = ""; ++ else return -1; ++ } ++ + /* Update the fastmap now if not correct already. */ + if (fastmap && !bufp->fastmap_accurate) { + re_compile_fastmap(bufp); -- cgit v1.2.3