1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Incorporate a patch from [ruby-dev:21263] to fix the problem where it

segfaults when there is an error in char-class in char-class.

Bump PORTREVISION accordingly.
This commit is contained in:
Akinori MUSHA 2003-08-27 16:06:06 +00:00
parent a0097a26ed
commit 150a7d659c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=87796
6 changed files with 90 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= oniguruma
PORTVERSION= 1.9.3
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= contrib

View File

@ -0,0 +1,29 @@
Obtained from [ruby-dev:21263]
Index: regparse.c
===================================================================
--- regparse.c (revision 217)
+++ regparse.c (working copy)
@@ -3571,7 +3571,10 @@
in_israw = 1;
val_entry:
len = WC2MBLEN(env->enc, v);
- if (len < 0) return len;
+ if (len < 0) {
+ r = len;
+ goto err;
+ }
in_type = (len == 1 ? CCV_SB : CCV_WC);
r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
&state, env);
@@ -3658,8 +3661,8 @@
acc = &(NCCLASS(anode));
r = or_cclass(cc, acc);
+ regex_node_free(anode);
cc_open_err:
- regex_node_free(anode);
if (r != 0) goto err;
}
break;

View File

@ -7,6 +7,7 @@
PORTNAME= oniguruma
PORTVERSION= 1.9.3
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= contrib

View File

@ -0,0 +1,29 @@
Obtained from [ruby-dev:21263]
Index: regparse.c
===================================================================
--- regparse.c (revision 217)
+++ regparse.c (working copy)
@@ -3571,7 +3571,10 @@
in_israw = 1;
val_entry:
len = WC2MBLEN(env->enc, v);
- if (len < 0) return len;
+ if (len < 0) {
+ r = len;
+ goto err;
+ }
in_type = (len == 1 ? CCV_SB : CCV_WC);
r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
&state, env);
@@ -3658,8 +3661,8 @@
acc = &(NCCLASS(anode));
r = or_cclass(cc, acc);
+ regex_node_free(anode);
cc_open_err:
- regex_node_free(anode);
if (r != 0) goto err;
}
break;

View File

@ -7,6 +7,7 @@
PORTNAME= oniguruma
PORTVERSION= 1.9.3
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= contrib

View File

@ -0,0 +1,29 @@
Obtained from [ruby-dev:21263]
Index: regparse.c
===================================================================
--- regparse.c (revision 217)
+++ regparse.c (working copy)
@@ -3571,7 +3571,10 @@
in_israw = 1;
val_entry:
len = WC2MBLEN(env->enc, v);
- if (len < 0) return len;
+ if (len < 0) {
+ r = len;
+ goto err;
+ }
in_type = (len == 1 ? CCV_SB : CCV_WC);
r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
&state, env);
@@ -3658,8 +3661,8 @@
acc = &(NCCLASS(anode));
r = or_cclass(cc, acc);
+ regex_node_free(anode);
cc_open_err:
- regex_node_free(anode);
if (r != 0) goto err;
}
break;