noux: prevent accessing invalid leaf path in open

Fixes #3542.
This commit is contained in:
Josef Söntgen 2019-10-24 16:50:50 +02:00 committed by Christian Helmuth
parent c79ebc93a2
commit 60f390ddf8
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ bool Noux::Child::syscall(Noux::Session::Syscall sc)
if (&vfs_handle->ds() == &_root_dir)
leaf_path = _sysio.open_in.path;
if (!leaf_path)
break;
Shared_pointer<Io_channel>
channel(new (_heap) Vfs_io_channel(_sysio.open_in.path,
leaf_path,