diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2003-11-20 05:11:20 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2003-11-20 05:11:20 +0000 |
commit | de17ca25a405583ab4aff58081c529d2145ea478 (patch) | |
tree | f5e1c3d97a0539df5ff742622ecebce11fbdb4b6 /devel/oniguruma | |
parent | 471191997ee4afd5ed95f49d045c5965b647459a (diff) | |
download | ports-de17ca25a405583ab4aff58081c529d2145ea478.tar.gz ports-de17ca25a405583ab4aff58081c529d2145ea478.zip |
Notes
Diffstat (limited to 'devel/oniguruma')
-rw-r--r-- | devel/oniguruma/Makefile | 1 | ||||
-rw-r--r-- | devel/oniguruma/files/patch-ruby-dev-21973 | 82 |
2 files changed, 83 insertions, 0 deletions
diff --git a/devel/oniguruma/Makefile b/devel/oniguruma/Makefile index 22bb9da766ef..a7701c2ff818 100644 --- a/devel/oniguruma/Makefile +++ b/devel/oniguruma/Makefile @@ -7,6 +7,7 @@ PORTNAME= oniguruma PORTVERSION= 1.9.5 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_RUBY} MASTER_SITE_SUBDIR= contrib diff --git a/devel/oniguruma/files/patch-ruby-dev-21973 b/devel/oniguruma/files/patch-ruby-dev-21973 new file mode 100644 index 000000000000..a825c121c31c --- /dev/null +++ b/devel/oniguruma/files/patch-ruby-dev-21973 @@ -0,0 +1,82 @@ +Taken from: [ruby-dev:21973] + +Index: regparse.c +=================================================================== +--- regparse.c (.../ags/oniguruma/1.9.5) (revision 245) ++++ regparse.c (.../runk/oniguruma) (revision 245) +@@ -833,6 +833,10 @@ + e->back_refs = (int* )NULL; + } + } ++ if (IS_NOT_NULL(t->e)) { ++ xfree(t->e); ++ t->e = NULL; ++ } + t->num = 0; + } + return 0; +@@ -3611,6 +3615,7 @@ + enum CCVALTYPE val_type, in_type; + int val_israw, in_israw; + ++ prev_cc = (CClassNode* )NULL; + *np = NULL_NODE; + r = fetch_token_in_cc(tok, src, end, env); + if (r == TK_BYTE && tok->u.c == '^') { +@@ -3633,7 +3638,6 @@ + *np = node = node_new_cclass(); + CHECK_NULL_RETURN_VAL(node, REGERR_MEMORY); + cc = &(NCCLASS(node)); +- prev_cc = (CClassNode* )NULL; + + and_start = 0; + state = CCS_START; +@@ -3810,6 +3814,7 @@ + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc); + if (r != 0) goto err; ++ bbuf_free(cc->mbuf); + } + else { + prev_cc = cc; +@@ -3846,6 +3851,7 @@ + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc); + if (r != 0) goto err; ++ bbuf_free(cc->mbuf); + cc = prev_cc; + } + +@@ -3864,6 +3870,8 @@ + return 0; + + err: ++ if (cc != &(NCCLASS(*np))) ++ bbuf_free(cc->mbuf); + regex_node_free(*np); + return r; + } +@@ -4490,7 +4498,10 @@ + + *top = NULL; + r = parse_branch(&node, tok, term, src, end, env); +- if (r < 0) return r; ++ if (r < 0) { ++ regex_node_free(node); ++ return r; ++ } + + if (r == term) { + *top = node; +Index: regcomp.c +=================================================================== +--- regcomp.c (.../ags/oniguruma/1.9.5) (revision 245) ++++ regcomp.c (.../runk/oniguruma) (revision 245) +@@ -3675,6 +3675,7 @@ + } + else { + len = mblen(code, *p); ++ if (i + len > OPT_EXACT_MAXLEN) break; + for (j = 0; j < len; j++) + to->s[i++] = *p++; + } |