mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Fix non-zero terminated strings
This commit is contained in:
parent
ca729cb4e3
commit
b2e7b89041
@ -2239,7 +2239,7 @@ void zend_resolve_class_name(znode *class_name TSRMLS_DC) /* {{{ */
|
||||
/* This is a compound class name that contains namespace prefix */
|
||||
if (Z_STRVAL(class_name->u.constant)[0] == '\\') {
|
||||
/* The STRING name has "\" prefix */
|
||||
memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+1, Z_STRLEN(class_name->u.constant)-1);
|
||||
memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+1, Z_STRLEN(class_name->u.constant));
|
||||
Z_STR(class_name->u.constant) = STR_REALLOC(
|
||||
Z_STR(class_name->u.constant),
|
||||
Z_STRLEN(class_name->u.constant) - 1, 0);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1632,6 +1632,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
|
||||
memcpy(Z_STRVAL_P(zendlval) + len, CG(active_op_array)->function_name->val, CG(active_op_array)->function_name->len);
|
||||
len += CG(active_op_array)->function_name->len;
|
||||
}
|
||||
Z_STRVAL_P(zendlval)[len] = 0;
|
||||
} else if (CG(active_op_array) && CG(active_op_array)->function_name) {
|
||||
ZVAL_STR(zendlval, STR_COPY(CG(active_op_array)->function_name));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user