Re: [Exim] ACL problem when reading ACLs from files

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Nico Erfurth
Data:  
Para: William Thompson
CC: Philip Hazel, exim-users
Assunto: Re: [Exim] ACL problem when reading ACLs from files
William Thompson wrote:
>>>I'm trying to think how to go about a modification.
>>
>>Ah, the benefit of Open Source. :-)
>
>
> Fixed it... =)
>
> If it's unacceptable, please let me know. The way I did it works, there's
> just duplicated code.
>
> Here it is:
> --- acl.c-orig    Mon May 12 09:39:17 2003
> +++ acl.c    Tue May 20 10:37:27 2003
> @@ -1274,13 +1274,35 @@
>  acl_getline(void)
>  {
>  uschar *yield;
> +uschar *cont;
>  do
>    {
>    while (isspace(*acl_text)) acl_text++;
>    if (*acl_text == 0) return NULL;
>    yield = acl_text;
> +  continuation_line:
>    while (*acl_text != 0 && *acl_text != '\n') acl_text++;
> -  if (*acl_text == '\n') *acl_text++ = 0;
> +  if (*acl_text == '\n')
> +    {
> +    if (acl_text[-1] == '\\')


Maybe I'm wrong, but wouldn't this access uninitialized memory (in worst
case) when used on a empty line?