Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516173741.GK1827@brightrain.aerifal.cx>
Date: Fri, 16 May 2025 13:37:41 -0400
From: Rich Felker <dalias@...c.org>
To: Nuno Cruces <ncruces@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: strcasestr("", "") returns NULL

On Fri, May 16, 2025 at 05:59:22PM +0100, Nuno Cruces wrote:
> I wasn't suggesting they'd be used, just that they kinda demonstrate the
> problem is not absolutely intractable.
> In any case, if you're interested, glibc seems to use two-way for
> strcasestr, though I'm not sure if it supports every locale.
> I haven't looked into the details.

Interesting -- I wonder how they do it. If it's just for singlebyte
locales that's entirely useless (they're long obsolete) but maybe they
have some way to make it work with variable character length? Naively
I would think lack of random access makes this hard if not impossible
to do efficiently.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.