Hi,
I have submitted a patch for review:
    https://gerrit.libreoffice.org/1703
To pull it, you can do:
    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/03/1703/1
Resolves: fdo#37449 apparent access into empty codepage bitset
Change-Id: I2efc3ea10cd4313eaa1894fdfbffd113a125e2ba
(cherry picked from commit 5cd7c8906150b94c224ab9bc9f850684198c7f04)
---
M svtools/source/misc/sampletext.cxx
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index cf07a2a..ff74333 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -630,6 +630,11 @@
 #if OSL_DEBUG_LEVEL > 2
     void lcl_dump_unicode_coverage(const boost::dynamic_bitset<sal_uInt32> &rIn)
     {
+        if (rIn.none())
+        {
+            fprintf(stderr, "<NONE>\n");
+            return;
+        }
         if (rIn[vcl::UnicodeCoverage::BASIC_LATIN])
             fprintf(stderr, "BASIC_LATIN\n");
         if (rIn[vcl::UnicodeCoverage::LATIN_1_SUPPLEMENT])
@@ -890,6 +895,11 @@
 
     void lcl_dump_codepage_coverage(const boost::dynamic_bitset<sal_uInt32> &rIn)
     {
+        if (rIn.none())
+        {
+            fprintf(stderr, "<NONE>\n");
+            return;
+        }
         if (rIn[vcl::CodePageCoverage::CP1252])
             fprintf(stderr, "CP1252\n");
         if (rIn[vcl::CodePageCoverage::CP1250])
@@ -1061,7 +1071,7 @@
         aMasked.set(vcl::UnicodeCoverage::PHAGS_PA, false);
 
         //So, possibly a CJK font
-        if (!aMasked.count())
+        if (!aMasked.count() && !rFontCapabilities.maCodePageRange.empty())
         {
             boost::dynamic_bitset<sal_uInt32> aCJKCodePageMask(vcl::CodePageCoverage::MAX_CP_ENUM);
             aCJKCodePageMask.set(vcl::CodePageCoverage::CP932);
@@ -1513,8 +1523,7 @@
             if (nScriptType != com::sun::star::i18n::ScriptType::ASIAN)
             {
                 aFontCapabilities.maUnicodeRange &= getCJKMask();
-                aFontCapabilities.maCodePageRange =
-                    boost::dynamic_bitset<sal_uInt32>(aFontCapabilities.maCodePageRange.size());
+                aFontCapabilities.maCodePageRange.clear();
             }
             if (nScriptType != com::sun::star::i18n::ScriptType::LATIN)
                 aFontCapabilities.maUnicodeRange &= getLatinMask();
-- 
To view, visit https://gerrit.libreoffice.org/1703
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2efc3ea10cd4313eaa1894fdfbffd113a125e2ba
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Caolán McNamara <caolanm@redhat.com>
Context
- [PATCH] Change in core[libreoffice-3-6]: Resolves: fdo#37449 apparent	access into empty codepage bits... · via Code Review
 
   
 
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.