Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130220235651.GV6181@port70.net>
Date: Thu, 21 Feb 2013 00:56:51 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: strcasestr.c

* John Spencer <maillist-musl@...fooze.de> [2013-02-20 23:28:31 +0100]:
> On 02/17/2013 08:04 PM, Rich Felker wrote:
> >On Thu, Feb 14, 2013 at 10:23:49AM -0500, Rich Felker wrote:
> >>On Thu, Feb 14, 2013 at 09:59:56AM -0500, Todd C. Miller wrote:
> >>>When investigating using the musl strstr.c ofr OpenBSD I noticed
> >>>that musl only has a stub for strcasestr() that calls strstr().
> 
> according to git log, this function dates back to the very first
> musl commit ever...
> 
> >Since strcasestr is nonstandard and not clearly specified,
> 
> it's so non-standard that even nobody uses it.
> i looked up the usage of the function in codesearch.debian.net, and
> the only *user* (from all ~20K debian packages) of the function is
> gnu wget.

it seems wget only use it for

  str = strcasestr(str, "charset=");

when parsing text mime headers

i'll just note here that glibc has sse4.2 optimization for
strcasestr.. in case someone runs into performance troubles
finding the charset in mime headers..

(they tolower by 16bytes and find match with vectorized operations)

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.