diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 12:15:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 12:15:39 +0100 |
commit | 5de43a57cde537507de607c31573a31e90b4c5c8 (patch) | |
tree | 166c4eb812b0fc1707125cc3ed0c3b8b346651e6 /tools | |
parent | 28bb26279e8412763cabce7d172ca8246c70a30d (diff) |
Avoid rtl::OString::copy(getLength() + 1).
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/dirent.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 315be4e4f6c6..647dcfcd924f 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -1805,7 +1805,8 @@ FSysError DirEntry::ImpParseUnixName( const rtl::OString& rPfad, FSysPathStyle e } // den Restpfad bestimmen - aPfad = aPfad.copy(nPos + 1); + aPfad = nPos < aPfad.getLength() + ? aPfad.copy(nPos + 1) : rtl::OString(); while ( aPfad.getLength() && ( aPfad[0] == '/' ) ) aPfad = aPfad.copy(1); } |