Commit 6e3424a
committed
Fix
It reinterprets uninitialized memory as initialized and does not drop
existing elements of the Vec. Fix that.
Additionally, make it more general by appending, instead of overwriting
existing elements, and rename it to `append_to_enclave_vec`. A caller
can simply call `.clear()` before, for the old behavior.UserRef<[T]>::copy_to_enclave_vec
1 parent 1013428 commit 6e3424a
1 file changed
Lines changed: 6 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
691 | 685 | | |
692 | | - | |
693 | | - | |
| 686 | + | |
694 | 687 | | |
695 | 688 | | |
696 | 689 | | |
697 | 690 | | |
698 | 691 | | |
699 | | - | |
| 692 | + | |
700 | 693 | | |
701 | 694 | | |
702 | 695 | | |
| |||
0 commit comments