bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: bugs in regexp.c


From: Sam Steingold
Subject: [bug-gnulib] Re: bugs in regexp.c
Date: Fri, 11 Mar 2005 08:56:22 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

> * Paul Eggert <address@hidden> [2005-03-10 16:29:50 -0800]:
>
> Sam Steingold <address@hidden> writes:
>
>>>> 3. regcomp("$*"): "Invalid preceding regular expression"
>>>> 8. regcomp("[[:xdigit]+") works, but when the result is matched against
>>>>    "0[x:dig", it matches just "[", not "[x:dig"
>>
>> what's wrong with 8?
>
> POSIX says:
>
>   The character sequences "[.", "[=", and "[:" (left-bracket followed
>   by a period, equals-sign, or colon) shall be special inside a bracket
>   expression and are used to delimit collating symbols, equivalence
>   class expressions, and character class expressions. These symbols
>   shall be followed by a valid expression and the matching terminating
>   sequence ".]", "=]", or ":]", as described in the following items.
>
> (8) violates a "shall" so it's not a good test case.

then why doesn't regcomp signal an error?

>>> From the current gnulib code, I don't see how (3) could happen, so I'm
>>> at a bit of a loss about how that bug occurs.
>>
>> well, it _does_ occur.
>
> I agree, it's just that I don't see how it happens, and I don't know
> how to reproduce it easily.

main () {regcomp(NULL,"$*",0);}

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.mideasttruth.com/> <http://www.jihadwatch.org/>
<http://www.dhimmi.com/> <http://www.memri.org/> <http://pmw.org.il/>
Lisp: Serious empowerment.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]