Skip to content

Commit 5208fec

Browse files
committed
* 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
1 parent 280039e commit 5208fec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/Win32API/Win32API.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ Win32API_initialize(self, dllname, proc, import, export)
106106
}
107107
break;
108108
}
109+
110+
if (16 < RARRAY(a_import)->len) {
111+
rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY(a_import)->len);
112+
}
113+
109114
rb_iv_set(self, "__import__", a_import);
110115

111116
if (NIL_P(export)) {

0 commit comments

Comments
 (0)