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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 5 09:49:58 UTC 2021


 sc/source/filter/lotus/lotform.cxx |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit c52defd21c16f2438aed56ff62652a4883682ef0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 4 21:12:39 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 5 11:49:22 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I5222e0c116d7f828539af84321dd30a71c2e14a1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121655
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index fcb8ca336bff..d20f0a38fcec 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -647,23 +647,24 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
                 break;
             }
             case FT_Snum:
+            {
                 if ( bWK123 )
                 {
-                     sal_uInt32   nValue;
-
-                     Read( nValue );
-                     double  fValue = Snum32ToDouble( nValue );
+                     sal_uInt32 nValue(0);
+                     Read(nValue);
+                     double fValue = Snum32ToDouble( nValue );
                      aStack << aPool.Store( fValue );
                 }
                 else
                 {
-                        sal_Int16 nVal;
-                        Read( nVal );
-                        aStack << aPool.Store( SnumToDouble( nVal ) );
+                    sal_Int16 nVal(0);
+                    Read(nVal);
+                    aStack << aPool.Store( SnumToDouble( nVal ) );
                 }
                 break;
+            }
             default:
-                    SAL_WARN( "sc.filter", "*LotusToSc::Convert(): unknown enum!" );
+                SAL_WARN( "sc.filter", "*LotusToSc::Convert(): unknown enum!" );
         }
     }
 


More information about the Libreoffice-commits mailing list