store/source/stortree.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 6b05f6d7d5fd85d666a6d8b65864a46eea13b86d Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Aug 11 16:06:44 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 12 20:52:22 2024 +0200 cid#1606844 silence Overflowed array index read Change-Id: I87a0489377b12b930b7aca45c5bf384f28da8ebd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 3ce6c858d3ab..cd9b0bcb0d9d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3739,7 +3739,7 @@ void SwHTMLParser::NewFontAttr( HtmlTokenId nToken ) OUString aFace, aId, aStyle, aClass, aLang, aDir; Color aColor; sal_uLong nFontHeight = 0; // actual font height to set - sal_uInt16 nSize = 0; // font height in Netscape notation (1-7) + sal_uInt32 nSize = 0; // font height in Netscape notation (1-7) bool bColor = false; const HTMLOptions& rHTMLOptions = GetOptions(); @@ -3763,7 +3763,7 @@ void SwHTMLParser::NewFontAttr( HtmlTokenId nToken ) else if( nSSize > 7 ) nSSize = 7; - nSize = o3tl::narrowing<sal_uInt16>(nSSize); + nSize = nSSize; nFontHeight = m_aFontHeights[nSize-1]; } break; commit 3bab16f821995e70f03463397020879d30755325 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Aug 11 16:09:02 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 12 20:52:11 2024 +0200 cid#1608100 silence Overflowed array index read Change-Id: I882c93a09697f57971bccfcc74c7cebcc1b265ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171762 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx index e09850833690..ae620c76b7e5 100644 --- a/store/source/stortree.cxx +++ b/store/source/stortree.cxx @@ -72,7 +72,7 @@ sal_uInt16 OStoreBTreeNodeData::find (const T& t) const l = m + 1; } - sal_uInt16 const k = static_cast<sal_uInt16>(r); + sal_uInt16 const k = static_cast<sal_uInt16>(r & 0xFFFF); if ((k < capacityCount()) && (t.m_aKey < m_pData[k].m_aKey)) return k - 1; else