We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 485acf0 commit b4fce97Copy full SHA for b4fce97
src/CLR/Core/Execution.cpp
@@ -1979,6 +1979,13 @@ HRESULT CLR_RT_ExecutionEngine::InitializeLocals(
1979
parser.Initialize_MethodLocals(assembly, methodDef);
1980
CLR_RT_SignatureParser::Element element;
1981
1982
+ // ensure we don’t walk past the available generic parameters
1983
+ const int maxParams = parser.GenParamCount;
1984
+ if (genericParamPosition < 0 || genericParamPosition >= maxParams)
1985
+ {
1986
+ NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE);
1987
+ }
1988
+
1989
// advance into the VAR entry
1990
parser.Advance(element);
1991
0 commit comments