diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-02-17 15:05:49 +0000 |
---|---|---|
committer | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-02-17 15:05:49 +0000 |
commit | 45ef23c09a7147039b9a1109c26ad431228e3114 (patch) | |
tree | bb54d265fc30746d419ab90748df16d4356adaa0 | |
parent | e0d39f67ca8c22af3923ed886a313c0052708f8f (diff) | |
download | orc-45ef23c09a7147039b9a1109c26ad431228e3114.tar.gz |
Revert "orcprogram-c: avoid running out of bounds of varnames"
This reverts commit 951091788b8496868bf86b2f853f5214659e782a.
This isn't a proper fix and the risk of bringing in a regression is too
high for the small and incomplete improvement.
-rw-r--r-- | orc/orclimits.h | 1 | ||||
-rw-r--r-- | orc/orcprogram-c.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/orc/orclimits.h b/orc/orclimits.h index 18f1d9e..928b00c 100644 --- a/orc/orclimits.h +++ b/orc/orclimits.h @@ -15,7 +15,6 @@ ORC_BEGIN_DECLS #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 diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index 43cfaed..bff075a 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -291,7 +291,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) ORC_ASM_CODE(compiler," for (j = 0; j < m; j++) {\n"); prefix = 2; - for(i=0;i<ORC_N_VARNAMES;i++){ + for(i=0;i<ORC_N_COMPILER_VARIABLES;i++){ OrcVariable *var = compiler->vars + i; if (var->name == NULL) continue; switch (var->vartype) { @@ -417,7 +417,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) ORC_ASM_CODE(compiler," }\n"); } - for(i=0;i<ORC_N_VARNAMES;i++){ + for(i=0;i<ORC_N_COMPILER_VARIABLES;i++){ char varname[40]; OrcVariable *var = compiler->vars + i; if (var->name == NULL) continue; |