make mut_from_ref deny
This commit is contained in:
@@ -118,7 +118,7 @@ pub unsafe extern "C" fn posix_spawnp(
|
||||
return errno::ENOENT;
|
||||
}
|
||||
let path_env = unsafe { CStr::from_ptr(path_env) };
|
||||
for program_buf in PathSearchIter::new(&program.to_bytes(), &path_env) {
|
||||
for program_buf in PathSearchIter::new(program.to_bytes(), &path_env) {
|
||||
// SAFETY: CStr::from_ptr().to_bytes() always stop at null, no need to check again
|
||||
let program_c = unsafe { CStr::from_bytes_with_nul_unchecked(program_buf.as_slice()) };
|
||||
if Sys::access(program_c, F_OK).is_err() {
|
||||
|
||||
Reference in New Issue
Block a user