cid#1606631 Overflowed constant

Change-Id: I5dda80aaa2fa7ec47ad005048ec3738481e5b50c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174491
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2024-10-03 13:07:51 +01:00
parent 67158da00e
commit ed75a40d3c

View File

@@ -159,7 +159,8 @@ std::vector<OUString> jfw_convertUserPathList(std::u16string_view sUserPath)
if (nBootstrapVarEnd == std::u16string_view::npos)
{
// Current colon is part of bootstrap variable - skip it!
nextColon = sUserPath.find(SAL_PATHSEPARATOR, nextColon + 1);
const auto nAfterColon = (nextColon != std::string_view::npos) ? (nextColon + 1) : 0;
nextColon = sUserPath.find(SAL_PATHSEPARATOR, nAfterColon);
if (nextColon != 0 && nextColon != std::u16string_view::npos)
sToken = sUserPath.substr(nIdx, nextColon - nIdx);
else