Skip to content

Commit

Permalink
Set trailing zero
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Dec 1, 2017
1 parent 32e3d7b commit 24d5adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -5601,7 +5601,7 @@ void zend_compile_use(zend_ast *ast) /* {{{ */
zend_string *ns_name = zend_string_alloc(ZSTR_LEN(current_ns) + 1 + ZSTR_LEN(new_name), 0);
zend_str_tolower_copy(ZSTR_VAL(ns_name), ZSTR_VAL(current_ns), ZSTR_LEN(current_ns));
ZSTR_VAL(ns_name)[ZSTR_LEN(current_ns)] = '\\';
memcpy(ZSTR_VAL(ns_name) + ZSTR_LEN(current_ns) + 1, ZSTR_VAL(lookup_name), ZSTR_LEN(lookup_name));
memcpy(ZSTR_VAL(ns_name) + ZSTR_LEN(current_ns) + 1, ZSTR_VAL(lookup_name), ZSTR_LEN(lookup_name) + 1);

zend_check_use_conflict(type, old_name, new_name, ns_name);

Expand Down

0 comments on commit 24d5adb

Please sign in to comment.