fix: guard signature string overflow when too many parameters are passed
Add a MAX_PARAMETERS bound to the loop in signatureParameterList to prevent buffer overflow when a method signature has an excessive number of parameters. A compile error is already reported in such cases, but the unbounded loop could still write past the end of the name buffer. Also add regression test 494.wren to cover this scenario.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
0[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
// expect error line 1
|
||||
// expect error line 4
|
||||
Reference in New Issue
Block a user