Bug #757: strpos is not binary save
| From: | thies at digicol dot de | Date: | Fri, 18 Sep 1998 14:46:08 +0000 |
| Subject: | Bug #757: strpos is not binary save | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1225@lists.php.net to get a copy of this message | ||
From: thies@digicol.de
Operating system: all
PHP version: 3.0 Latest CVS
PHP Bug Type: Other
Bug description:
line 520:
if (needle->type == IS_STRING) {
if (strlen(needle->value.str.val)==0) {
php3_error(E_WARNING,"Empty delimiter");
RETURN_FALSE;
}
found = strstr(haystack->value.str.val, needle->value.str.val);
stig told me, that php strings should be binary safe, i believe that the strlen in the
strpos-function is not.
i believe it sould read:
....
if (needle->value.str.lenl==0) {
....
regards,
tc
--
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