Bruno Haible <[EMAIL PROTECTED]> writes:

> Simon Josefsson wrote:
>> I reviewed the memmem situation for gnutls, and the recent changes are
>> somewhat large.  Memmem now pulls in:
>> 
>> ! lgl/m4/eealloc.m4
>> ! lgl/m4/malloca.m4
>> ! lgl/malloca.c
>> ! lgl/malloca.h
>> ! lgl/malloca.valgrind
>
> These are no longer pulled in, after Eric's rewrite.

That's good, this hadn't been committed when I tested.

>> What's worse is that the memmem module actually gets compiled on glibc
>> systems, causing the size increase on all users on our primary platform.
>
> Some users may want this, if they don't want their program to loop nearly
> endlessly if it happens to be fed unlucky strings. Some users may not want
> this.

For gnutls, the strings are always the same (X.509 PEM headers), and we
haven't seen such slowdowns even on large inputs (searching for a 10
byte needle in a 500kb input is, while not typical, not uncommon).  What
properties do unlucky strings have?

/Simon


Reply via email to