ref: d98e084e77dc2794355477421e8e6386236285bc
parent: 540b7b0aa13418274213617487ed4c7c4d5e64a3
parent: 283be1536196f042cb0161a6611baf9b3d8918dc
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed May 18 18:19:48 EDT 2022
Merge remote-tracking branch 'origin/master'
--- a/src/cmd/cc/cc1/cpp.c
+++ b/src/cmd/cc/cc1/cpp.c
@@ -160,7 +160,7 @@
next();
} else {
do {
- mp->arglist = xrealloc(mp->arglist, n*sizeof(char *));
+ mp->arglist = xrealloc(mp->arglist, (n+1)*sizeof(char *));
mp->arglist[n] = parameter(mp);
} while (++n < NR_MACROARG && yytoken == ',');
}