mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Declares msre_var *rvar at the beggining of the function
Necessary to fix the build on Win8 VS 2011
This commit is contained in:
parent
a45fe95ed5
commit
de1c028d12
@ -3808,6 +3808,7 @@ static int msre_op_fuzzy_hash_execute(modsec_rec *msr, msre_rule *rule,
|
|||||||
#ifdef WITH_SSDEEP
|
#ifdef WITH_SSDEEP
|
||||||
char result[FUZZY_MAX_RESULT];
|
char result[FUZZY_MAX_RESULT];
|
||||||
struct fuzzy_hash_param_data *param = rule->op_param_data;
|
struct fuzzy_hash_param_data *param = rule->op_param_data;
|
||||||
|
FILE *fp;
|
||||||
char line[1024];
|
char line[1024];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3827,7 +3828,7 @@ static int msre_op_fuzzy_hash_execute(modsec_rec *msr, msre_rule *rule,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *fp = fopen(param->file, "r");
|
fp = fopen(param->file, "r");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
*error_msg = apr_psprintf(rule->ruleset->mp, "Not able to open " \
|
*error_msg = apr_psprintf(rule->ruleset->mp, "Not able to open " \
|
||||||
|
@ -1165,6 +1165,7 @@ static int var_files_tmp_contents_generate(modsec_rec *msr, msre_var *var,
|
|||||||
size_t nread;
|
size_t nread;
|
||||||
char *full_content = NULL;
|
char *full_content = NULL;
|
||||||
size_t total_lenght = 0;
|
size_t total_lenght = 0;
|
||||||
|
msre_var *rvar = NULL;
|
||||||
|
|
||||||
file = fopen(parts[i]->tmp_file_name, "r");
|
file = fopen(parts[i]->tmp_file_name, "r");
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
@ -1187,7 +1188,7 @@ static int var_files_tmp_contents_generate(modsec_rec *msr, msre_var *var,
|
|||||||
}
|
}
|
||||||
fclose(file);
|
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 = full_content;
|
||||||
rvar->value_len = total_lenght;
|
rvar->value_len = total_lenght;
|
||||||
rvar->name = apr_psprintf(mptmp, "FILES_TMP_CONTENT:%s",
|
rvar->name = apr_psprintf(mptmp, "FILES_TMP_CONTENT:%s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user