summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_event.c
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-25 11:18:17 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-25 11:18:17 +0000
commit108c4e4495385ccb5cab87dd723f27ef0ab52049 (patch)
treed03e75050026f00dd623376f99e77b7d8f2b010d /ext/win32ole/win32ole_event.c
parent682f3a788102113fdb1927e2b42ef7932106acb2 (diff)
* ext/win32ole/win32ole.c(fole_s_connect, fole_initialize): raise a
security error with the tainted string object. * ext/win32ole/win32ole_event.c(ev_advise): ditto. * test/win32ole/test_win32ole.rb(test_s_new_exc_svr_tainted, test_s_new_exc_host_tainted): ditto. * test/win32ole/test_win32ole_event.rb(test_s_new_exc_tainted): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole_event.c')
-rw-r--r--ext/win32ole/win32ole_event.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 77b3626..00aabd2 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -897,12 +897,11 @@ ev_advise(int argc, VALUE *argv, VALUE self)
}
if(!RB_TYPE_P(itf, T_NIL)) {
+ pitf = StringValuePtr(itf);
if (rb_safe_level() > 0 && OBJ_TAINTED(itf)) {
- rb_raise(rb_eSecurityError, "Insecure Event Creation - %s",
+ rb_raise(rb_eSecurityError, "insecure event creation - `%s'",
StringValuePtr(itf));
}
- SafeStringValue(itf);
- pitf = StringValuePtr(itf);
hr = find_iid(ole, pitf, &iid, &pTypeInfo);
}
else {