X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftls.c;h=a5cb35bd9bba039f03478edf4fb1b2634dc192a5;hb=e236f915d39e27c89ac6e9ef8dd6bdf38f164a6b;hp=f34cf632182c52f6ebb335db36600d55015bc261;hpb=6aa6fc9c5304536913bc585d0395093213fce72d;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/tls.c b/src/src/tls.c index f34cf6321..a5cb35bd9 100644 --- a/src/src/tls.c +++ b/src/src/tls.c @@ -64,17 +64,18 @@ Returns: TRUE if OK; result may still be NULL after forced failure */ static BOOL -expand_check(const uschar *s, const uschar *name, uschar **result) +expand_check(const uschar *s, const uschar *name, uschar **result, uschar ** errstr) { -if (s == NULL) *result = NULL; else +if (!s) + *result = NULL; +else if ( !(*result = expand_string(US s)) /* need to clean up const more */ + && !expand_string_forcedfail + ) { - *result = expand_string(US s); /* need to clean up const some more */ - if (*result == NULL && !expand_string_forcedfail) - { - log_write(0, LOG_MAIN|LOG_PANIC, "expansion of %s failed: %s", name, - expand_string_message); - return FALSE; - } + *errstr = US"Internal error"; + log_write(0, LOG_MAIN|LOG_PANIC, "expansion of %s failed: %s", name, + expand_string_message); + return FALSE; } return TRUE; }