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

Caolán McNamara caolanm at redhat.com
Mon Feb 5 12:40:30 UTC 2018


 vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz5942-1.wmf |binary
 vcl/source/gdi/sallayout.cxx                             |    6 ++++++
 2 files changed, 6 insertions(+)

New commits:
commit b189726c4f61a5d28a3b87112e7a85174b5573aa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 5 09:02:39 2018 +0000

    ofz#5942 Out of memory
    
    when missing a glyph in a grapheme we set the whole grapheme as missing.  There
    can be a huge long grapheme and iterating through each missing codepoint
    results in the whole range pushed back repeatedly as missing.
    
    Change-Id: Ib7c283389ee2357eb3b4264c78e558955ebad1eb
    Reviewed-on: https://gerrit.libreoffice.org/49223
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz5942-1.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz5942-1.wmf
new file mode 100644
index 000000000000..f9a72867c593
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz5942-1.wmf differ
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 07b65564d6c2..a282a0248621 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -270,6 +270,12 @@ void ImplLayoutRuns::AddRun( int nCharPos0, int nCharPos1, bool bRTL )
         nCharPos1 = nTemp;
     }
 
+    if (maRuns.size() >= 2 && nCharPos0 == maRuns[maRuns.size() - 2] && nCharPos1 == maRuns[maRuns.size() - 1])
+    {
+        //this run is the same as the last
+        return;
+    }
+
     // append new run
     maRuns.push_back( nCharPos0 );
     maRuns.push_back( nCharPos1 );


More information about the Libreoffice-commits mailing list