diff options
-rw-r--r-- | sal/osl/unx/tempfile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index b91d4b6e0ac7..00ae0664b2c0 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -51,7 +51,7 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir ) pValue = "/tmp"; auto nLen = strlen(pValue); - while (nLen && pValue[nLen - 1] == '/') + while (nLen > 1 && pValue[nLen - 1] == '/') // Allow path consisting of single "/" --nLen; rtl_string2UString( &ustrTempPath, pValue, nLen, osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS ); assert(ustrTempPath); |