[Rpm-maint] Parens in expressions bugfix

Michael Schroeder mls at suse.de
Tue Feb 13 17:24:32 UTC 2007


FYI:

----- Forwarded message from Michael Schroeder <mls at suse.de> -----
> Hi Jeff & Co,
> 
> seems like parenthesis never worked in the expression parses as
> the parser doesn't read over the trailing ')'. Very strange, it
> seems like this was broken since the very beginning of rpm.
> Looks like no one uses complex logic in their if statements...
> 
> Here's a trivial patch:
> 
> --- build/expression.c.orig	2007-02-13 17:37:53.000000000 +0100
> +++ build/expression.c	2007-02-13 17:35:46.000000000 +0100
> @@ -347,6 +347,8 @@
>        rpmError(RPMERR_BADSPEC, _("unmatched (\n"));
>        return NULL;
>      }
> +    if (rdToken(state))
> +      return NULL;
>      break;
>  
>    case TOK_INTEGER:
> 

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}



More information about the Rpm-maint mailing list