Skip to content

Commit 79a53cf

Browse files
committed
Fix UB in transmute
1 parent 33c8992 commit 79a53cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/common/args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod imp {
8282
}
8383

8484
fn get_global_ptr() -> *mut Option<Box<Vec<Vec<u8>>>> {
85-
unsafe { mem::transmute(&GLOBAL_ARGS_PTR) }
85+
unsafe { mem::transmute(&mut GLOBAL_ARGS_PTR) }
8686
}
8787

8888
}

0 commit comments

Comments
 (0)