-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
On https://github.com/bwasty/learn-opengl-rs/blob/master/src/shader.rs#L107 and related code, we have:
gl::GetShaderInfoLog(shader, 1024, ptr::null_mut(), infoLog.as_mut_ptr() as *mut GLchar);
println!("ERROR::SHADER_COMPILATION_ERROR of type: {}\n{}\n \
-- --------------------------------------------------- -- ",
type_,
str::from_utf8(&infoLog).unwrap());
}
GetShaderInfoLog
stores a null-terminated string into infoLog
, which may contain garbage after the null terminator. str::from_utf8()
may fail if the garbage in infoLog
contains invalid unicode values.
alteous and crsaracco
Metadata
Metadata
Assignees
Labels
No labels