sw/source/core/doc/docbm.cxx                 |    6 ++-
 vcl/source/bitmap/BitmapScaleSuperFilter.cxx |   52 +++++++++++++--------------
 2 files changed, 30 insertions(+), 28 deletions(-)

New commits:
commit 1692c206e582c42b50308b72509bf86874afaf73
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jul 18 12:16:30 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Jul 19 09:37:41 2019 +0200

    cid#704863 Dereference after null check
    
    Change-Id: I472f48c64a6f2d13b124ede28a83dab3b46f759f
    Reviewed-on: https://gerrit.libreoffice.org/75915
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index ef7812c6cb8e..883be228142e 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -681,7 +681,8 @@ namespace sw { namespace mark
         if (bUndoIsEnabled)
         {
             m_pDoc->GetIDocumentUndoRedo().DoUndo(bUndoIsEnabled);
-            
m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsTextFieldmark>(*pFieldMark));
+            if (pFieldMark)
+                
m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsTextFieldmark>(*pFieldMark));
         }
 
         return pFieldMark;
@@ -726,7 +727,8 @@ namespace sw { namespace mark
         if (bUndoIsEnabled)
         {
             m_pDoc->GetIDocumentUndoRedo().DoUndo(bUndoIsEnabled);
-            
m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsNoTextFieldmark>(*pFieldMark));
+            if (pFieldMark)
+                
m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoInsNoTextFieldmark>(*pFieldMark));
         }
 
         m_pDoc->getIDocumentState().SetEnableSetModified(bEnableSetModified);
commit abd13678a02a39110c6eef5ad55dcb97fce62ade
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jul 18 11:44:28 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Jul 19 09:37:29 2019 +0200

    cid#1448308 Unintended sign extension
    
    Change-Id: I3d89afa66dc42144f0717c34593d48c4869aeec4
    Reviewed-on: https://gerrit.libreoffice.org/75923
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx 
b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index b621ebe95fa7..7f7d5bffdd3c 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -395,10 +395,10 @@ void scaleDown32bit(ScaleContext &rCtx, long nStartY, 
long nEndY)
                                 1 : (rCtx.maMapIX[nRight] - 
rCtx.maMapIX[nLeft]);
             }
 
-            long nSum1 = 0;
-            long nSum2 = 0;
-            long nSum3 = 0;
-            long nSum4 = 0;
+            int nSum1 = 0;
+            int nSum2 = 0;
+            int nSum3 = 0;
+            int nSum4 = 0;
             BilinearWeightType nTotalWeightY = 0;
 
             for (long i = 0; i<= nLineRange; i++)
@@ -406,10 +406,10 @@ void scaleDown32bit(ScaleContext &rCtx, long nStartY, 
long nEndY)
                 Scanline pTmpY = rCtx.mpSrc->GetScanline(nLineStart + i);
                 Scanline pTmpX = pTmpY + constColorComponents * nRowStart;
 
-                long nSumRow1 = 0;
-                long nSumRow2 = 0;
-                long nSumRow3 = 0;
-                long nSumRow4 = 0;
+                int nSumRow1 = 0;
+                int nSumRow2 = 0;
+                int nSumRow3 = 0;
+                int nSumRow4 = 0;
                 BilinearWeightType nTotalWeightX = 0;
 
                 for (long j = 0; j <= nRowRange; j++)
@@ -531,17 +531,17 @@ void scaleDownPalette8bit(ScaleContext &rCtx, long 
nStartY, long nEndY)
                 nRowRange = ( rCtx.maMapIX[ nRight ] == rCtx.maMapIX[ nLeft ] 
)? 1 : ( rCtx.maMapIX[ nRight ] - rCtx.maMapIX[ nLeft ] );
             }
 
-            long nSumR = 0;
-            long nSumG = 0;
-            long nSumB = 0;
+            int nSumR = 0;
+            int nSumG = 0;
+            int nSumB = 0;
             BilinearWeightType nTotalWeightY = 0;
 
             for(long i = 0; i<= nLineRange; i++)
             {
                 Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i );
-                long nSumRowR = 0;
-                long nSumRowG = 0;
-                long nSumRowB = 0;
+                int nSumRowR = 0;
+                int nSumRowG = 0;
+                int nSumRowB = 0;
                 BilinearWeightType nTotalWeightX = 0;
 
                 for(long j = 0; j <= nRowRange; j++)
@@ -655,16 +655,16 @@ void scaleDownPaletteGeneral(ScaleContext &rCtx, long 
nStartY, long nEndY)
                 nRowRange = ( rCtx.maMapIX[ nRight ] == rCtx.maMapIX[ nLeft ] 
)? 1 : ( rCtx.maMapIX[ nRight ] - rCtx.maMapIX[ nLeft ] );
             }
 
-            long nSumR = 0;
-            long nSumG = 0;
-            long nSumB = 0;
+            int nSumR = 0;
+            int nSumG = 0;
+            int nSumB = 0;
             BilinearWeightType nTotalWeightY = 0;
 
             for(long i = 0; i<= nLineRange; i++)
             {
-                long nSumRowR = 0;
-                long nSumRowG = 0;
-                long nSumRowB = 0;
+                int nSumRowR = 0;
+                int nSumRowG = 0;
+                int nSumRowB = 0;
                 BilinearWeightType nTotalWeightX = 0;
 
                 Scanline pScanlineSrc = rCtx.mpSrc->GetScanline( nLineStart + 
i );
@@ -915,16 +915,16 @@ void scaleDownNonPaletteGeneral(ScaleContext &rCtx, long 
nStartY, long nEndY)
                 nRowRange = ( rCtx.maMapIX[ nRight ] == rCtx.maMapIX[ nLeft ] 
)? 1 : ( rCtx.maMapIX[ nRight ] - rCtx.maMapIX[ nLeft ] );
             }
 
-            long nSumR = 0;
-            long nSumG = 0;
-            long nSumB = 0;
+            int nSumR = 0;
+            int nSumG = 0;
+            int nSumB = 0;
             BilinearWeightType nTotalWeightY = 0;
 
             for(long i = 0; i<= nLineRange; i++)
             {
-                long nSumRowR = 0;
-                long nSumRowG = 0;
-                long nSumRowB = 0;
+                int nSumRowR = 0;
+                int nSumRowG = 0;
+                int nSumRowB = 0;
                 BilinearWeightType nTotalWeightX = 0;
 
                 Scanline pScanlineSrc = rCtx.mpSrc->GetScanline( nLineStart + 
i );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to