We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4166fc2 commit 13f4757Copy full SHA for 13f4757
1 file changed
ext/standard/mail.c
@@ -112,14 +112,13 @@ static php_mail_header_value_error_type php_mail_build_headers_check_field_value
112
return NO_HEADER_ERROR;
113
}
114
115
-
116
-static bool php_mail_build_headers_check_field_name(const zend_string *key)
+static zend_result php_mail_build_headers_check_field_name(const zend_string *key)
117
{
118
size_t len = 0;
119
120
/* https://tools.ietf.org/html/rfc2822#section-2.2 */
121
- while (len < key->len) {
122
- if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') {
+ while (len < ZSTR_LEN(key)) {
+ if (*(ZSTR_VAL(key)+len) < 33 || *(ZSTR_VAL(key)+len) > 126 || *(ZSTR_VAL(key)+len) == ':') {
123
return FAILURE;
124
125
len++;
0 commit comments