summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 10:09:31 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 10:09:31 +0000
commit628c802eae8cb2807c283f2bab2ca7bcb115ecdd (patch)
tree4a68aeadf50621ad873bd43188bf7a1a8215f105
parentb487f7881fd220a13313ebeb3968f17d45bb2b23 (diff)
* error.c (syserr_initialize): taint message if mesg is given
and it is tainted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--error.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 981afba581..220c1193d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 12 19:07:55 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * error.c (syserr_initialize): taint message if mesg is given
+ and it is tainted.
+
Tue Oct 12 18:25:43 2010 NARUSE, Yui <naruse@ruby-lang.org>
* io.c (rb_io_ungetc): always see Bignum. On 32bit valid value
diff --git a/error.c b/error.c
index 94126f709b..4ad252bde1 100644
--- a/error.c
+++ b/error.c
@@ -1059,6 +1059,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
if (le != me && rb_enc_asciicompat(me))
le = me;
}/* else assume err is non ASCII string. */
+ if (OBJ_TAINTED(str)) OBJ_TAINT(mesg);
rb_enc_associate(mesg, le);
}
else {