Skip to content

Commit 5351aa9

Browse files
committed
Merge branch 'string_size_refactor_take_2' of https://github.com/weltling/php-src into string_size_refactor_take_2
2 parents 764054c + 569cbd2 commit 5351aa9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Zend/zend_constants.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void clean_non_persistent_constants(TSRMLS_D)
145145
}
146146
}
147147

148-
ZEND_API void zend_register_null_constant(const char *name, uint name_len, int flags, int module_number TSRMLS_DC)
148+
ZEND_API void zend_register_null_constant(const char *name, zend_str_size_uint name_len, int flags, int module_number TSRMLS_DC)
149149
{
150150
zend_constant c;
151151

@@ -157,7 +157,7 @@ ZEND_API void zend_register_null_constant(const char *name, uint name_len, int f
157157
zend_register_constant(&c TSRMLS_CC);
158158
}
159159

160-
ZEND_API void zend_register_bool_constant(const char *name, uint name_len, zend_bool bval, int flags, int module_number TSRMLS_DC)
160+
ZEND_API void zend_register_bool_constant(const char *name, zend_str_size_uint name_len, zend_bool bval, int flags, int module_number TSRMLS_DC)
161161
{
162162
zend_constant c;
163163

sapi/cgi/fastcgi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ static int fcgi_read_request(fcgi_request *req)
992992
if (zend_hash_find(&fcgi_mgmt_vars, q->var, q->var_len, (void**) &value) != SUCCESS) {
993993
continue;
994994
}
995-
zlen = Z_STRLEN_PP(value);
995+
zlen = Z_STRSIZE_PP(value);
996996
if ((p + 4 + 4 + q->var_len + zlen) >= (buf + sizeof(buf))) {
997997
break;
998998
}
@@ -1514,7 +1514,7 @@ void fcgi_set_mgmt_var(const char * name, size_t name_len, const char * value, s
15141514
zvalue = pemalloc(sizeof(*zvalue), 1);
15151515
Z_TYPE_P(zvalue) = IS_STRING;
15161516
Z_STRVAL_P(zvalue) = pestrndup(value, value_len, 1);
1517-
Z_STRLEN_P(zvalue) = value_len;
1517+
Z_STRSIZE_P(zvalue) = value_len;
15181518
zend_hash_add(&fcgi_mgmt_vars, name, name_len, &zvalue, sizeof(zvalue), NULL);
15191519
}
15201520

0 commit comments

Comments
 (0)