make mut_from_ref deny

This commit is contained in:
auronandace
2026-07-02 08:28:38 +01:00
parent e8d4ce4822
commit e714c570bc
8 changed files with 25 additions and 5 deletions
+1 -1
View File
@@ -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() {