aboutsummaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-23 22:02:08 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-23 22:02:08 +0100
commitbd3d7513f8a8b8c58f0f0952027f7dd1f6883f59 (patch)
tree2b35a828975cfd36a3a97733ba4786c9793f2b6d /src/android
parent36538b5634dfc9823771d237174816c7ed00f454 (diff)
parent8005b012ce89ff300ee6313a73afc6309526810a (diff)
downloadglutin-bd3d7513f8a8b8c58f0f0952027f7dd1f6883f59.tar.gz
glutin-bd3d7513f8a8b8c58f0f0952027f7dd1f6883f59.zip
Merge pull request #223 from Ms2ger/CString
Fix a use-after-free in Android get_proc_address.
Diffstat (limited to 'src/android')
-rw-r--r--src/android/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/mod.rs b/src/android/mod.rs
index bde2417..7c4f186 100644
--- a/src/android/mod.rs
+++ b/src/android/mod.rs
@@ -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 ()
}