diff --git a/repos/os/include/os/path.h b/repos/os/include/os/path.h index f89b715f29..cfdc744a2f 100644 --- a/repos/os/include/os/path.h +++ b/repos/os/include/os/path.h @@ -30,6 +30,7 @@ class Genode::Path_base public: class Path_too_long { }; + class Path_invalid { }; protected: @@ -196,6 +197,9 @@ class Genode::Path_base void import(char const *path, char const *pwd = 0) { + if (!path) + throw Path_invalid(); + /* * Validate 'pwd' argument, if not supplied, enforce invariant * that 'pwd' is an absolute path.