mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
Merge pull request #1586 from rliebig/dev-liebig-syscall-read-eisdir
return EISDIR in case ql_syscall_read is attempted on directory
This commit is contained in:
@@ -415,6 +415,8 @@ def ql_syscall_read(ql: Qiling, fd: int, buf: int, length: int):
|
||||
|
||||
try:
|
||||
data = f.read(length)
|
||||
except IsADirectoryError:
|
||||
return -EISDIR
|
||||
except ConnectionError:
|
||||
ql.log.debug('read failed due to a connection error')
|
||||
return -EIO
|
||||
|
||||
Reference in New Issue
Block a user