Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > cd8ce32c919af60229fca1d7f792c60e > files > 64

openoffice.org-3.2.0-12.35.fc13.src.rpm

rhbz#642996 [abrt] CffSubsetterContext::readDictOp (SIGSEGV)

diff -r e070063a347f vcl/source/fontsubset/cff.cxx
--- a/vcl/source/fontsubset/cff.cxx	Fri Oct 30 19:10:16 2009 +0100
+++ b/vcl/source/fontsubset/cff.cxx	Fri Oct 29 18:12:57 2010 +0200
@@ -637,15 +637,19 @@
 	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;