Skip to content

Commit

Permalink
lib-sieve: include extension: Fixed segfault that (sometimes) occurre…
Browse files Browse the repository at this point in the history
…d when the global script location was left unconfigured.
  • Loading branch information
stephanbosch committed Jun 22, 2017
1 parent 62151b1 commit 0714b34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib-sieve/plugins/include/ext-include-binary.c
Expand Up @@ -316,7 +316,7 @@ static bool ext_include_binary_open

/* Can we find the script dependency ? */
storage = ext_include_get_script_storage
(ext, location, str_c(script_name), NULL);
(ext, location, str_c(script_name), &error);
if ( storage == NULL ) {
/* No, recompile */
// FIXME: handle ':optional' in this case
Expand Down
3 changes: 2 additions & 1 deletion src/lib-sieve/plugins/include/ext-include-common.c
Expand Up @@ -160,7 +160,8 @@ struct sieve_storage *ext_include_get_script_storage
sieve_sys_info(svinst, "include: sieve_global is unconfigured; "
"include of `:global' script `%s' is therefore not possible",
str_sanitize(script_name, 80));
*error_r = SIEVE_ERROR_NOT_FOUND;
if ( error_r != NULL )
*error_r = SIEVE_ERROR_NOT_FOUND;
return NULL;
}
if ( ctx->global_storage == NULL ) {
Expand Down

0 comments on commit 0714b34

Please sign in to comment.