[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 25 19:37:31 UTC 2021


 sw/source/filter/ww8/ww8scan.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 694e33c220e9918152aedadfcecddfceb3f5845f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 25 16:12:54 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 25 20:36:52 2021 +0100

    cid#1473931 silence Untrusted allocation size
    
    is *is* checked
    
    Change-Id: If8e8eafdbb8deb94c63e7e3a0aa5aaac29e52353
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113100
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 8fbf388cacb1..bd51f9d5bb69 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6954,7 +6954,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
 
     OSL_ENSURE(m_cstd <= nMaxPossibleRecords,
         "allegedly more styles that available data");
-    m_cstd = std::min(m_cstd, nMaxPossibleRecords);
+    m_cstd = o3tl::sanitizing_min(m_cstd, nMaxPossibleRecords);
 }
 
 // Read1STDFixed() reads a style. If the style is completely existent,


More information about the Libreoffice-commits mailing list