Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/openssl/openssl_pwhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ PHP_FUNCTION(openssl_password_hash)
Z_PARAM_ARRAY_HT(options)
ZEND_PARSE_PARAMETERS_END();

if (strcmp(ZSTR_VAL(algo), "argon2i") && strcmp(ZSTR_VAL(algo), "argon2id")) {
if (!zend_string_equals_literal(algo, "argon2i") && !zend_string_equals_literal(algo, "argon2id")) {
zend_argument_value_error(1, "must be a valid password openssl hashing algorithm");
RETURN_THROWS();
}
Expand All @@ -357,7 +357,7 @@ PHP_FUNCTION(openssl_password_verify)
Z_PARAM_STR(digest)
ZEND_PARSE_PARAMETERS_END();

if (strcmp(ZSTR_VAL(algo), "argon2i") && strcmp(ZSTR_VAL(algo), "argon2id")) {
if (!zend_string_equals_literal(algo, "argon2i") && !zend_string_equals_literal(algo, "argon2id")) {
zend_argument_value_error(1, "must be a valid password openssl hashing algorithm");
RETURN_THROWS();
}
Expand Down
3 changes: 2 additions & 1 deletion ext/soap/php_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type)
{
if (sdl && sdl->encoders) {
encodePtr enc;
size_t type_len = strlen(type);

ZEND_HASH_FOREACH_PTR(sdl->encoders, enc) {
if (type[0] == '{') {
if (enc->details.clark_notation
&& strcmp(ZSTR_VAL(enc->details.clark_notation), type) == 0) {
&& zend_string_equals_cstr(enc->details.clark_notation, type, type_len)) {
return enc;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion ext/soap/php_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static bool in_domain(const zend_string *host, const zend_string *domain)
{
if (ZSTR_VAL(domain)[0] == '.') {
if (ZSTR_LEN(host) > ZSTR_LEN(domain)) {
return strcmp(ZSTR_VAL(host)+ZSTR_LEN(host)-ZSTR_LEN(domain), ZSTR_VAL(domain)) == 0;
return zend_string_equals_cstr(domain, ZSTR_VAL(host) + ZSTR_LEN(host) - ZSTR_LEN(domain), ZSTR_LEN(domain));
} else {
return false;
}
Expand Down
Loading