Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62a6f22

Browse files
kukackajiriFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Fixes for Parfait errors - mostly unhandled NULL pointer dereference and data type mismatch
1 parent5f996d4 commit62a6f22

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

‎apache2/mod_security2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s
10381038
#else
10391039
msr=create_tx_context((request_rec*)r);
10401040
#endif
1041-
if (msr->txcfg->debuglog_level >=9) {
1041+
if (msr!=NULL&&msr->txcfg->debuglog_level >=9) {
10421042
if (msr==NULL) {
10431043
msr_log(msr,9,"Failed to create context after request failure.");
10441044
}

‎apache2/re.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,10 @@ msre_actionset *msre_actionset_create_default(msre_engine *engine) {
13401340
* Sets the default values for the hard-coded actionset configuration.
13411341
*/
13421342
voidmsre_actionset_set_defaults(msre_actionset*actionset) {
1343+
1344+
if (actionset==NULL) {
1345+
return;
1346+
}
13431347
/* Metadata */
13441348
if (actionset->id==NOT_SET_P)actionset->id=NULL;
13451349
if (actionset->rev==NOT_SET_P)actionset->rev=NULL;

‎apache2/re_actions.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ static apr_status_t msre_action_setenv_execute(modsec_rec *msr, apr_pool_t *mptm
14701470
env_name=log_escape_nq_ex(msr->mp,env->value,env->value_len);
14711471

14721472
/* Execute the requested action. */
1473-
if (env_name[0]=='!') {
1473+
if (env_name!=NULL&&env_name[0]=='!') {
14741474
/* Delete */
14751475
apr_table_unset(msr->r->subprocess_env,env_name+1);
14761476

@@ -1532,7 +1532,7 @@ apr_status_t msre_action_setvar_execute(modsec_rec *msr, apr_pool_t *mptmp,
15321532
var_name=log_escape_nq_ex(msr->mp,var->value,var->value_len);
15331533

15341534
/* Handle the exclamation mark. */
1535-
if (var_name[0]=='!') {
1535+
if (var_name!=NULL&&var_name[0]=='!') {
15361536
var_name=var_name+1;
15371537
is_negated=1;
15381538
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp