In alloc::heap::reallocate there is this line: ``` ptr::copy_memory(new_ptr, ptr as *const u8, old_size); ``` It is completely busted when `new_size < old_size`
Activity
Copy only up to `min(new_size, old_size)` when doing reallocate.
min(new_size, old_size)
when doing reallocate. #16706auto merge of #16706 : pnkfelix/rust/fsk-fix-nojem-realloc, r=thestinger
Auto merge of rust-lang#16687 - kilpkonn:master, r=Veykril