[Libreoffice-commits] .: vcl/source

David Tardon dtardon at kemper.freedesktop.org
Fri Oct 29 09:05:15 PDT 2010


 vcl/source/fontsubset/cff.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 280a6945a9b03ab3ddd987253ed14816d96b24f9
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Oct 29 18:04:28 2010 +0200

    skip reserved operators

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 675c768..854c03a 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -611,15 +611,19 @@ void CffSubsetterContext::readDictOp( void)
     const U8 c = *mpReadPtr;
     if( c <= 21 ) {
         int nOpId = *(mpReadPtr++);
-        const char* pCmdName;
+        const char* pCmdName = 0;
         if( nOpId != 12)
-            pCmdName = pDictOps[ nOpId];
+            pCmdName = pDictOps[nOpId];
         else {
             const U8 nExtId = *(mpReadPtr++);
-            pCmdName = pDictEscs[ nExtId];
+            if (nExtId < 39)
+               pCmdName = pDictEscs[nExtId];
             nOpId = 900 + nExtId;
         }
 
+        if (!pCmdName)  // skip reserved operators
+            return;
+
         //TODO: if( nStackIdx > 0)
         switch( *pCmdName) {
         default: fprintf( stderr, "unsupported DictOp.type=\'%c\'\n", *pCmdName); break;


More information about the Libreoffice-commits mailing list