You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Only accept UTF-8 directory entries
This commit is contained in:
@@ -2,8 +2,8 @@ use crate::consts::{ROOTMNT, ROOTOVL};
|
||||
use crate::ffi::MagiskInit;
|
||||
use base::libc::{O_CREAT, O_RDONLY, O_WRONLY};
|
||||
use base::{
|
||||
BufReadExt, Directory, FsPath, FsPathBuf, LoggedResult, ResultExt, Utf8CStr,
|
||||
Utf8CString, clone_attr, cstr, cstr_buf, debug, path,
|
||||
BufReadExt, Directory, FsPath, FsPathBuf, LoggedResult, ResultExt, Utf8CStr, Utf8CString,
|
||||
clone_attr, cstr, cstr_buf, debug, path,
|
||||
};
|
||||
use std::io::BufReader;
|
||||
use std::{
|
||||
@@ -71,7 +71,7 @@ impl MagiskInit {
|
||||
match &dir.read()? {
|
||||
None => return Ok(()),
|
||||
Some(e) => {
|
||||
let name = e.name().to_str()?;
|
||||
let name = e.name();
|
||||
let src = FsPathBuf::from(cstr_buf::dynamic(256))
|
||||
.join(src_dir)
|
||||
.join(name);
|
||||
|
||||
Reference in New Issue
Block a user