mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Fix a use-after-free in Android get_proc_address.
This commit is contained in:
@@ -263,7 +263,8 @@ impl Window {
|
||||
}
|
||||
|
||||
pub fn get_proc_address(&self, addr: &str) -> *const () {
|
||||
let addr = CString::from_slice(addr.as_bytes()).as_slice_with_nul().as_ptr();
|
||||
let addr = CString::from_slice(addr.as_bytes());
|
||||
let addr = addr.as_slice_with_nul().as_ptr();
|
||||
unsafe {
|
||||
ffi::egl::GetProcAddress(addr) as *const ()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user