mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
string.c: fix String#crypt leak introduced in r58866
* string.c (rb_str_crypt): define LARGE_CRYPT_DATA when allocating git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
daf14f713f
commit
2079b71000
2 changed files with 5 additions and 1 deletions
|
@ -546,6 +546,10 @@ CODE
|
|||
assert_raise(ArgumentError) {S("mypassword").crypt(S("aa".encode(enc)))}
|
||||
assert_raise(ArgumentError) {S("mypassword".encode(enc)).crypt(S("aa"))}
|
||||
end
|
||||
|
||||
@cls == String and assert_no_memory_leak([], 's = ""', <<~'end;') # do
|
||||
1000.times { s.crypt(-"..").clear }
|
||||
end;
|
||||
end
|
||||
|
||||
def test_delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue