Declares msre_var *rvar at the beggining of the function

Necessary to fix the build on Win8 VS 2011
This commit is contained in:
Felipe Zimmerle 2014-09-23 05:53:01 -07:00
parent a45fe95ed5
commit de1c028d12
2 changed files with 4 additions and 2 deletions

View File

@ -3808,6 +3808,7 @@ static int msre_op_fuzzy_hash_execute(modsec_rec *msr, msre_rule *rule,
#ifdef WITH_SSDEEP
char result[FUZZY_MAX_RESULT];
struct fuzzy_hash_param_data *param = rule->op_param_data;
FILE *fp;
char line[1024];
#endif
@ -3827,7 +3828,7 @@ static int msre_op_fuzzy_hash_execute(modsec_rec *msr, msre_rule *rule,
return -1;
}
FILE *fp = fopen(param->file, "r");
fp = fopen(param->file, "r");
if (!fp)
{
*error_msg = apr_psprintf(rule->ruleset->mp, "Not able to open " \

View File

@ -1165,6 +1165,7 @@ static int var_files_tmp_contents_generate(modsec_rec *msr, msre_var *var,
size_t nread;
char *full_content = NULL;
size_t total_lenght = 0;
msre_var *rvar = NULL;
file = fopen(parts[i]->tmp_file_name, "r");
if (file == NULL)
@ -1187,7 +1188,7 @@ static int var_files_tmp_contents_generate(modsec_rec *msr, msre_var *var,
}
fclose(file);
msre_var *rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
rvar->value = full_content;
rvar->value_len = total_lenght;
rvar->name = apr_psprintf(mptmp, "FILES_TMP_CONTENT:%s",