These two for loops use varnames[i], since varname has 48 items avoid
running out of bounds by running the for loop up to that limit.
CID 1147004
#define ORC_N_CONSTANTS 20
#define ORC_N_LABELS 40
#define ORC_N_COMPILER_VARIABLES (ORC_N_VARIABLES+32)
+#define ORC_N_VARNAMES 48
#define ORC_GP_REG_BASE 32
#define ORC_VEC_REG_BASE 64
ORC_ASM_CODE(compiler," for (j = 0; j < m; j++) {\n");
prefix = 2;
- for(i=0;i<ORC_N_COMPILER_VARIABLES;i++){
+ for(i=0;i<ORC_N_VARNAMES;i++){
OrcVariable *var = compiler->vars + i;
if (var->name == NULL) continue;
switch (var->vartype) {
ORC_ASM_CODE(compiler," }\n");
}
- for(i=0;i<ORC_N_COMPILER_VARIABLES;i++){
+ for(i=0;i<ORC_N_VARNAMES;i++){
char varname[40];
OrcVariable *var = compiler->vars + i;
if (var->name == NULL) continue;