From 5208fec1cfd93841e0b1a89c42cc2e8692e1aa9c Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 6 Mar 2003 16:26:43 +0000 Subject: * 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 --- ext/Win32API/Win32API.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ext/Win32API/Win32API.c') 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)) { -- cgit v1.2.3