Skip to content

Commit d61607c

Browse files
committed
use memchr instead of strchr
1 parent f97c39f commit d61607c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ static const char *phpdbg_load_module_or_extension(zend_string **path, const cha
11961196
phpdbg_error("extension_dir ini setting contains a nul byte");
11971197
return NULL;
11981198
}
1199-
if (strchr(ZSTR_VAL(*path), '/') != NULL || strchr(ZSTR_VAL(*path), DEFAULT_SLASH) != NULL) {
1199+
if (memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL || memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL) {
12001200
/* path is fine */
12011201
} else if (extension_dir && ZSTR_LEN(extension_dir) > 0) {
12021202
zend_string *libpath;

0 commit comments

Comments
 (0)