Re: Bug #757 Updated: strpos is not binary save
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Bug #757 Updated: strpos is not binary save | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-1236@lists.php.net to get a copy of this message | ||
> strpos() as it is right now is not binary safe, and
> that check is intentional, to protect the binary
> unsafe implementation from receiving unexpected
> arguments (and thus crash).
That's not much of a check though. If the needle argument can crash it,
then so can the haystack argument which is not checked. What we really
need is a memstr() function. The strchr() should probably be changed to
memchr().
-Rasmus
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net