diff options
author | Chris Johns <chrisj@rtems.org> | 2018-05-08 15:09:45 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-05-25 09:27:01 +1200 |
commit | 1724a97457512ab3626ca15d0b2fc6a585c83cfd (patch) | |
tree | 53f73aa296a7d271ccc6fda49f175eb74418c9a9 | |
parent | 3485f426e26a1d6b23753adc21d0ccc122982d06 (diff) |
rtemstoolkit/path: Fix crash when going about the root directory.
-rw-r--r-- | rtemstoolkit/rld-path.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rtemstoolkit/rld-path.cpp b/rtemstoolkit/rld-path.cpp index c848676..35af055 100644 --- a/rtemstoolkit/rld-path.cpp +++ b/rtemstoolkit/rld-path.cpp @@ -145,7 +145,13 @@ namespace rld } else if (dir == "..") { + /* + * If the path goes above the root of where we are there is nothing + * that can be done so return the path passed in. + */ aps.pop_back (); + if (aps.empty ()) + return path; } else { |