Skip to content

Commit 4faf34e

Browse files
committed
Fix: String is not zero-terminatedpage
1 parent 5546ec1 commit 4faf34e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/help.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ zend_long date_double_to_timestamp(double value) {
3838
}
3939
smart_str_append_long(&_modify_arg_string, days);
4040
smart_str_appendl(&_modify_arg_string, " days", 5);
41+
ZSTR_VAL(_modify_arg_string.s)[ZSTR_LEN(_modify_arg_string.s)] = '\0';
4142
ZVAL_STR(&_modify_args[0], _modify_arg_string.s);
4243
call_object_method(&datetime, "modify", 1, _modify_args, &_modify_result);
4344
zval_ptr_dtor(&datetime);

0 commit comments

Comments
 (0)