summaryrefslogtreecommitdiff
path: root/ext/Win32API
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-06 16:26:43 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-06 16:26:43 +0000
commit5208fec1cfd93841e0b1a89c42cc2e8692e1aa9c (patch)
tree36a0d231c290d66e05a88d1923867e7650474333 /ext/Win32API
parent280039eb20e48de88e3664f130820864a361bbd1 (diff)
* ext/Win32API/Win32API (Win32API_initialize): should check number of
papameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/Win32API')
-rw-r--r--ext/Win32API/Win32API.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 15e1c9d320..a33e989d27 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -106,6 +106,11 @@ Win32API_initialize(self, dllname, proc, import, export)
}
break;
}
+
+ if (16 < RARRAY(a_import)->len) {
+ rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY(a_import)->len);
+ }
+
rb_iv_set(self, "__import__", a_import);
if (NIL_P(export)) {