![]() |
|
Message-ID: <CAM0U___R7q8pxbULLWOMNMt6kTUXp45=zErVMsfkOjDD0z5N1w@mail.gmail.com>
Date: Fri, 16 May 2025 08:32:00 +0100
From: Nuno Cruces <ncruces@...il.com>
To: musl@...ts.openwall.com
Subject: strcasestr("", "") returns NULL
Hi,
Currently strcasestr("", "") returns NULL which is inconsistent
with strstr("", "").
For strstr, the C standard specifies "If s2 points to a string with zero
length, the function returns s1."
strcasestr is a nonstandard extension, but to the best of my knowledge,
both glibc and the BSDs decide to be consistent with strstr in this case.
Regards,
Nuno
Content of type "text/html" skipped
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.