summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-01 06:47:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-01 06:47:47 +0000
commit87750a6e313f894194f9475e4df4f6022be12c97 (patch)
tree6673e3628521d804dc732a9cc8c636781a110d6c
parentd525aa044104e16362bc9115ec89e312ea7d896e (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--parse.y4
-rw-r--r--re.c4
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b0e30087b..674fd66db3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Jul 1 03:25:56 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * parse.y (call_args): command_call can be the last argument of
+ call_args. It had to be the only argument.
+
+ * re.c (rb_reg_s_quote): should not dump core even for unsane mbc
+ string.
+
Thu Jun 29 18:57:05 2000 Koga Youichirou <y-koga@mms.mt.nec.co.jp>
* ruby.c (proc_options): mktemp() vulnerability removed.
diff --git a/parse.y b/parse.y
index 66b44cc17e..2d3ca54bab 100644
--- a/parse.y
+++ b/parse.y
@@ -875,6 +875,10 @@ call_args : command_call
{
$$ = $1;
}
+ | args ',' command_call
+ {
+ $$ = list_append($1, $3);
+ }
| args opt_block_arg
{
$$ = arg_blk_pass($1, $2);
diff --git a/re.c b/re.c
index ffe3b60168..2ab4c56ec8 100644
--- a/re.c
+++ b/re.c
@@ -982,11 +982,11 @@ rb_reg_s_quote(argc, argv)
tmp = ALLOCA_N(char, len*2);
t = tmp;
- for (; s != send; s++) {
+ for (; s < send; s++) {
if (ismbchar(*s)) {
size_t n = mbclen(*s);
- while (n--)
+ while (n-- && s < send)
*t++ = *s++;
s--;
continue;