Memory Safety Preservation for WebAssembly