sw/source/uibase/app/docstyle.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f63ffcba32527d04abbd460dddd3e5ca63d695df
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 18 11:11:39 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Aug 18 18:31:08 2022 +0200

    cid#1509286 silence Out-of-bounds access
    
    Change-Id: I35e84803c766e0932899f55d73922236260cb5e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138477
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index e64b4e8f48aa..ced5ec648606 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -386,7 +386,7 @@ void 
SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
                                                      const OUString& rName)
 {
     sal_uInt32 nTmpPos = FindName( eFam, rName );
-    if( nTmpPos < maImpl.size() )
+    if (nTmpPos != SAL_MAX_UINT32)
         maImpl.erase(maImpl.begin() + nTmpPos);
 
     // assumption: this seldom occurs, the iterator is built, then emptied.

Reply via email to