From 60f390ddf86e0c3353cb4ef0b9171d3a3a66d989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 24 Oct 2019 16:50:50 +0200 Subject: [PATCH] noux: prevent accessing invalid leaf path in open Fixes #3542. --- repos/ports/src/noux/syscall.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/ports/src/noux/syscall.cc b/repos/ports/src/noux/syscall.cc index 2547a0170..1d2722105 100644 --- a/repos/ports/src/noux/syscall.cc +++ b/repos/ports/src/noux/syscall.cc @@ -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 channel(new (_heap) Vfs_io_channel(_sysio.open_in.path, leaf_path,