Skip to content
Snippets Groups Projects
Commit 114fe5f6 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

lib-sieve: redirect action: Fix lack of NULL checking in new...

lib-sieve: redirect action: Fix lack of NULL checking in new X-Sieve-Redirected-From header comparisons.

Problem found by scan-build.
parent 5b813421
No related branches found
No related tags found
Loading
...@@ -495,11 +495,11 @@ act_redirect_check_loop_header(const struct sieve_action_exec_env *aenv, ...@@ -495,11 +495,11 @@ act_redirect_check_loop_header(const struct sieve_action_exec_env *aenv,
while (*headers != NULL) { while (*headers != NULL) {
const char *header = t_str_trim(*headers, " \t\r\n"); const char *header = t_str_trim(*headers, " \t\r\n");
if (strcmp(header, recipient) == 0) { if (recipient != NULL && strcmp(header, recipient) == 0) {
*loop_detected_r = TRUE; *loop_detected_r = TRUE;
break; break;
} }
if (strcmp(header, user_email) == 0) { if (user_email != NULL && strcmp(header, user_email) == 0) {
*loop_detected_r = TRUE; *loop_detected_r = TRUE;
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.