xmloff/source/core/namespacemap.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 09200875ce643e66f293d39bb27630a3fdbb984d Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Dec 3 20:50:50 2023 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Mon Dec 4 09:26:45 2023 +0100 cid#1546325, cid#1546212: invalid iterator (xmloff/namespacemap.cxx) Change-Id: I7a3377326daa5a0d933a68b9d4f5a64983ba2ab8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160278 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/xmloff/source/core/namespacemap.cxx b/xmloff/source/core/namespacemap.cxx index c64f28087f36..1d844fe04cd9 100644 --- a/xmloff/source/core/namespacemap.cxx +++ b/xmloff/source/core/namespacemap.cxx @@ -360,6 +360,7 @@ sal_uInt16 SvXMLNamespaceMap::GetFirstKey() const sal_uInt16 SvXMLNamespaceMap::GetNextKey( sal_uInt16 nLastKey ) const { auto aIter = maKeyToNamespaceMap.find ( nLastKey ); + assert(aIter != maKeyToNamespaceMap.end()); return (++aIter == maKeyToNamespaceMap.end()) ? USHRT_MAX : (*aIter).first; } @@ -378,6 +379,7 @@ sal_uInt16 SvXMLNamespaceMap::GetFirstIndex() const sal_uInt16 SvXMLNamespaceMap::GetNextIndex( sal_uInt16 nOldIdx ) const { auto aIter = maKeyToNamespaceMap.find ( nOldIdx ); + assert(aIter != maKeyToNamespaceMap.end()); return (++aIter == maKeyToNamespaceMap.end()) ? USHRT_MAX : (*aIter).first; }