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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 18 10:52:50 UTC 2021


 vcl/source/filter/svm/SvmReader.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 821ae763cc03f69e226cdba66bb9c82c03483a23
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 18 09:30:45 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 18 12:52:14 2021 +0200

    ofz#37315: Invalid-enum-value
    
    Change-Id: I573ecf0cd1bd7b71ebf77a503d9937ee9f9d867c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120627
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 431dd089acdd..55acc5bfd946 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -832,14 +832,14 @@ rtl::Reference<MetaAction> SvmReader::TextLineHandler()
     sal_uInt32 nTempUnderline(0);
     mrStream.ReadUInt32(nTempUnderline);
 
-    pAction->SetStrikeout(static_cast<FontStrikeout>(nTempStrikeout));
-    pAction->SetUnderline(static_cast<FontLineStyle>(nTempUnderline));
+    pAction->SetStrikeout(static_cast<FontStrikeout>(nTempStrikeout & SAL_MAX_ENUM));
+    pAction->SetUnderline(static_cast<FontLineStyle>(nTempUnderline & SAL_MAX_ENUM));
 
     if (aCompat.GetVersion() >= 2)
     {
         sal_uInt32 nTempOverline(0);
         mrStream.ReadUInt32(nTempOverline);
-        pAction->SetOverline(static_cast<FontLineStyle>(nTempOverline));
+        pAction->SetOverline(static_cast<FontLineStyle>(nTempOverline & SAL_MAX_ENUM));
     }
 
     return pAction;


More information about the Libreoffice-commits mailing list