summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2010-10-29 18:04:28 +0200
committerDavid Tardon <dtardon@redhat.com>2010-10-29 18:04:28 +0200
commit2e43d2389888828130b2e61cb8dc3cd0ebc1c94e (patch)
tree4c4403e54d8ff2e2c0e4a96a06b2ff396f2c1dd0
parentbdf13d154b958ad54cf5fbab9b8081894a6e161c (diff)
skip reserved operators
-rw-r--r--vcl/source/fontsubset/cff.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 15deba7d2e21..a94e46659a41 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;