string.c: term fill
* string.c (rb_str_plus): fill wchar terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b890ed926a
commit
c00aca4aa0
2
string.c
2
string.c
@ -1455,7 +1455,7 @@ rb_str_plus(VALUE str1, VALUE str2)
|
|||||||
ptr3 = RSTRING_PTR(str3);
|
ptr3 = RSTRING_PTR(str3);
|
||||||
memcpy(ptr3, ptr1, len1);
|
memcpy(ptr3, ptr1, len1);
|
||||||
memcpy(ptr3+len1, ptr2, len2);
|
memcpy(ptr3+len1, ptr2, len2);
|
||||||
ptr3[len1+len2] = '\0';
|
TERM_FILL(&ptr3[len1+len2], rb_enc_mbminlen(enc));
|
||||||
|
|
||||||
if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2))
|
if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2))
|
||||||
OBJ_TAINT(str3);
|
OBJ_TAINT(str3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user