diff options
author | Stanislav Sedov <stas@FreeBSD.org> | 2008-06-25 23:00:28 +0000 |
---|---|---|
committer | Stanislav Sedov <stas@FreeBSD.org> | 2008-06-25 23:00:28 +0000 |
commit | 5027cd7b724add7e71ec509036fec9a49a0dd84c (patch) | |
tree | aed855c29eb57ccf72df82f85cf43b357813ec4c /lang/ruby18/files/patch-bignum.c | |
parent | This 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-bignum.c')
-rw-r--r-- | lang/ruby18/files/patch-bignum.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/ruby18/files/patch-bignum.c b/lang/ruby18/files/patch-bignum.c new file mode 100644 index 000000000000..6bb648daf0b3 --- /dev/null +++ b/lang/ruby18/files/patch-bignum.c @@ -0,0 +1,12 @@ +--- bignum.c.orig 2007-09-19 06:13:21.000000000 +0400 ++++ bignum.c 2008-06-26 01:54:38.000000000 +0400 +@@ -652,6 +652,9 @@ + if (BIGZEROP(x)) { + return rb_str_new2("0"); + } ++ if (i >= LONG_MAX/SIZEOF_BDIGITS/CHAR_BIT) { ++ rb_raise(rb_eRangeError, "bignum too big to convert into `string'"); ++ } + j = SIZEOF_BDIGITS*CHAR_BIT*i; + switch (base) { + case 2: break; |