Skip to content

Commit 80f9dac

Browse files
committed
Fix the mknodat path argument
1 parent 94c394e commit 80f9dac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

qiling/os/posix/syscall/stat.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,12 @@ def ql_syscall_lstat64(ql: Qiling, path: int, buf_ptr: int):
11561156
return statFamily(ql, path, buf_ptr, "lstat64", Lstat, pack_stat64_struct)
11571157

11581158

1159-
def ql_syscall_mknodat(ql: Qiling, dirfd: int, pathname: int, mode: int, dev: int):
1160-
file_path = ql.os.utils.read_cstring(pathname)
1161-
real_path = ql.os.path.transform_to_real_path(file_path)
1162-
regreturn = 0
1159+
def ql_syscall_mknodat(ql: Qiling, dirfd: int, path: int, mode: int, dev: int):
1160+
dirfd, real_path = transform_path(ql, dirfd, path)
11631161

11641162
try:
11651163
os.mknod(real_path, mode, dev, dir_fd=dirfd)
1164+
regreturn = 0
11661165
except:
11671166
regreturn = -1
11681167

0 commit comments

Comments
 (0)