diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-01 20:19:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-02 00:13:32 +0200 |
commit | bea8576e8218cc8fee7966877d7412377e70e204 (patch) | |
tree | 163ccecb5804e91e064a8b96ee2a29d6a6e0a95e | |
parent | ff79a22fd04f9bbb5f4f67f21862db3a531de833 (diff) |
cid#1596706 Dereference after null check
Change-Id: If7156d9b0aaa392ff0c1e98dfdd4d05c6dcaabce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166982
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index aeb85c1c9f1d..611a14145dde 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -2274,7 +2274,8 @@ INetURLObject::PrefixInfo const * INetURLObject::getPrefix(sal_Unicode const *& sal_Int32 i = 0; for (; pFirst < pLast; ++i) { - if (pFirst->m_pPrefix && pFirst->m_pPrefix[i] == '\0') + assert(pFirst->m_pPrefix && "we start search after the dummy entry"); + if (pFirst->m_pPrefix[i] == '\0') { pMatch = pFirst++; pMatched = p; |