1. mst
  2. ooo340

Commits

Kurt Zenker  committed 149a562 Merge

CWS-TOOLING: integrate CWS impress208

  • Participants
  • Parent commits 3083b9b, 992230e
  • Branches default

Comments (0)

Files changed (4)

File filter/source/graphicfilter/itga/itga.cxx

View file
  • Ignore whitespace
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 										nXCount = 0;
 										nY += nYAdd;
 										nYCount++;
+
+										if( nYCount >= mpFileHeader->nImageHeight )
+											return false; // invalid picture
 									}
 								}
 							}
 										nXCount = 0;
 										nY += nYAdd;
 										nYCount++;
+
+										if( nYCount >= mpFileHeader->nImageHeight )
+											return false; // invalid picture
 									}
 								}
 							}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}
 									nXCount = 0;
 									nY += nYAdd;
 									nYCount++;
+
+									if( nYCount >= mpFileHeader->nImageHeight )
+										return false; // invalid picture
 								}
 							}
 						}

File libxml2/libxml2-xpath.patch

View file
  • Ignore whitespace
---- misc/libxml2-2.7.6/xpath.c
-+++ misc/build/libxml2-2.7.6/xpath.c
-@@ -8104,9 +8104,17 @@
+--- misc/libxml2-2.7.6/xpath.c	2009-09-24 17:32:00.000000000 +0200
++++ misc/build/libxml2-2.7.6/xpath.c	2011-01-03 17:21:08.788256100 +0100
+@@ -8106,9 +8106,17 @@
  xmlNodePtr
  xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
      if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
      if (cur == NULL) return(NULL) ; /* ERROR */
      if (cur->next != NULL) return(cur->next) ;
      do {
-@@ -8160,8 +8168,13 @@
+@@ -8162,8 +8170,13 @@
  xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
  {
      if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
      if (cur == NULL)
  	return (NULL);
      if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
-@@ -8205,8 +8218,8 @@
+@@ -8207,8 +8220,8 @@
          cur = ctxt->context->node;
          if (cur == NULL)
              return (NULL);
          ctxt->ancestor = cur->parent;
      }
      if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
+@@ -11737,11 +11750,16 @@
+ 
+ 	    if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
+ 	        xmlXPathObjectPtr tmp;
+-		/* pop the result */
++		/* pop the result if any */
+ 		tmp = valuePop(ctxt);
+-		xmlXPathReleaseObject(xpctxt, tmp);
+-		/* then pop off contextObj, which will be freed later */
+-		valuePop(ctxt);
++		if (tmp != contextObj) {
++			/*
++			* Free up the result
++			* then pop off contextObj, which will be freed later
++			*/
++			xmlXPathReleaseObject(xpctxt, tmp);
++			valuePop(ctxt);
++		}
+ 		goto evaluation_error;
+ 	    }
+ 

File package/source/zipapi/ZipFile.cxx

View file
  • Ignore whitespace
 
 		aGrabber.seek( 0 );
 
-		for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, 32000 ) && aBuffer.getLength() > 30; )
-		{
-			const sal_Int8 *pBuffer = aBuffer.getConstArray();
-			sal_Int32 nBufSize = aBuffer.getLength();
+		const sal_Int32 nToRead = 32000;
+        for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, nToRead ) && aBuffer.getLength() > 16; )
+        {
+            const sal_Int8 *pBuffer = aBuffer.getConstArray();
+            sal_Int32 nBufSize = aBuffer.getLength();
 
-			sal_Int32 nPos = 0;
-			while( nPos < nBufSize - 16 )
+            sal_Int32 nPos = 0;
+            // the buffer should contain at least one header,
+            // or if it is end of the file, at least the postheader with sizes and hash
+            while( nPos < nBufSize - 30
+                || ( aBuffer.getLength() < nToRead && nPos < nBufSize - 16 ) )
+
 			{
 				if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 )
 				{

File xpdf/xpdf-3.02.patch

View file
  • Ignore whitespace
      }
      objStr->getObject(e->gen, num, obj);
      break;
+--- misc/xpdf-3.02/fofi/FoFiType1.cc	2007-02-27 23:05:51.000000000 +0100
++++ misc/build/xpdf-3.02/fofi/FoFiType1.cc	2011-01-04 13:41:06.871136746 +0100
+@@ -224,7 +224,7 @@
+ 		code = code * 8 + (*p2 - '0');
+ 	      }
+ 	    }
+-	    if (code < 256) {
++	    if (code < 256 && code >= 0) {
+ 	      for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
+ 	      if (*p == '/') {
+ 		++p;
+--- misc/xpdf-3.02/xpdf/Gfx.cc	2007-02-27 23:05:52.000000000 +0100
++++ misc/build/xpdf-3.02/xpdf/Gfx.cc	2011-01-04 13:41:19.847501431 +0100
+@@ -441,6 +441,7 @@
+ 	 void *abortCheckCbkDataA) {
+   int i;
+ 
++  parser = NULL;
+   xref = xrefA;
+   subPage = gFalse;
+   printCommands = globalParams->getPrintCommands();
+@@ -483,6 +484,7 @@
+ 	 void *abortCheckCbkDataA) {
+   int i;
+ 
++  parser = NULL;
+   xref = xrefA;
+   subPage = gTrue;
+   printCommands = globalParams->getPrintCommands();