Added check for total arguments size for variadic functions.

This commit is contained in:
acqn
2023-09-18 16:44:04 +08:00
parent 12193790e5
commit 51e304f10f
2 changed files with 17 additions and 0 deletions

13
test/err/bug2144.c Normal file
View File

@@ -0,0 +1,13 @@
/* Bug #2144 - Maximum parameter size is not checked for variadic functions */
void a(...) {}
void b()
{
/* Argument size > 255 */
a(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L);
}