rpms/openoffice.org/FC-5 openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch, NONE, 1.1 openoffice.org.spec, 1.683, 1.684
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Dec 4 11:11:08 UTC 2006
Author: caolanm
Update of /cvs/dist/rpms/openoffice.org/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv7328
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch
Log Message:
rhbz#217347 openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch
openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch:
enhwmf.cxx | 85 +++++++++++++++++++++++++++++++++----------------------------
winwmf.cxx | 26 ++++++++++--------
2 files changed, 61 insertions(+), 50 deletions(-)
--- NEW FILE openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch ---
diff -ru svtools/source/filter.vcl/wmf/enhwmf.cxx svtools/source/filter.vcl/wmf/enhwmf.cxx
--- openoffice.org.orig/svtools/source/filter.vcl/wmf/enhwmf.cxx 2006-11-27 07:02:23.000000000 -0500
+++ openoffice.org/svtools/source/filter.vcl/wmf/enhwmf.cxx 2006-11-27 07:06:51.000000000 -0500
@@ -385,33 +387,37 @@
UINT16* pnPoints;
Point* pPtAry;
- INT32 i, nPoly, nGesPoints;
+ UINT32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
- pnPoints = new UINT16[ nPoly ];
-
- for ( i = 0; i < nPoly; i++ )
+ if (nGesPoints < SAL_MAX_UINT32 / sizeof(Point))
{
- *pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
- }
- // Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
- for ( i = 0; i < nGesPoints; i++ )
- {
- *pWMF >> nX32 >> nY32;
- pPtAry[ i ] = Point( nX32, nY32 );
+ // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
+ pnPoints = new UINT16[ nPoly ];
+
+ for ( i = 0; i < nPoly; i++ )
+ {
+ *pWMF >> nPoints;
+ pnPoints[ i ] = (UINT16)nPoints;
+ }
+ // Polygonpunkte holen:
+ pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
+
+ for ( i = 0; i < nGesPoints; i++ )
+ {
+ *pWMF >> nX32 >> nY32;
+ pPtAry[ i ] = Point( nX32, nY32 );
+ }
+ // PolyPolygon Actions erzeugen
+ PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
+ delete[] (char*) pPtAry;
+ delete[] pnPoints;
}
- // PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
- pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
- delete[] pnPoints;
}
break;
@@ -1137,31 +1143,34 @@
UINT16* pnPoints;
Point* pPtAry;
- INT32 i, nPoly, nGesPoints;
+ UINT32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
- pnPoints = new UINT16[ nPoly ];
- for ( i = 0; i < nPoly; i++ )
- {
- *pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
- }
- // Polygonpunkte holen:
- pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
- for ( i = 0; i < nGesPoints; i++ )
+ if (nGesPoints < SAL_MAX_UINT32 / sizeof(Point))
{
- *pWMF >> nX16 >> nY16;
- pPtAry[ i ] = Point( nX16, nY16 );
+ // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
+ pnPoints = new UINT16[ nPoly ];
+ for ( i = 0; i < nPoly; i++ )
+ {
+ *pWMF >> nPoints;
+ pnPoints[ i ] = (UINT16)nPoints;
+ }
+ // Polygonpunkte holen:
+ pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];
+ for ( i = 0; i < nGesPoints; i++ )
+ {
+ *pWMF >> nX16 >> nY16;
+ pPtAry[ i ] = Point( nX16, nY16 );
+ }
+
+ // PolyPolygon Actions erzeugen
+ PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
+ delete[] (char*) pPtAry;
+ delete[] pnPoints;
}
-
- // PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
- pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
- delete[] (char*) pPtAry;
- delete[] pnPoints;
- };
+ }
break;
case EMR_FILLRGN :
diff -ru svtools/source/filter.vcl/wmf/winwmf.cxx svtools/source/filter.vcl/wmf/winwmf.cxx
--- openoffice.org.orig/svtools/source/filter.vcl/wmf/winwmf.cxx 2006-11-27 07:02:23.000000000 -0500
+++ openoffice.org/svtools/source/filter.vcl/wmf/winwmf.cxx 2006-11-27 07:05:30.000000000 -0500
@@ -874,17 +874,21 @@
aMemoryStream >> aPt.X()
>> aPt.Y()
>> nStringLen;
- sal_Unicode* pBuf = aString.AllocBuffer( (sal_uInt16)nStringLen );
- for ( i = 0; i < nStringLen; i++ )
- aMemoryStream >> pBuf[ i ];
- aMemoryStream >> nDXCount;
- if ( nDXCount )
- pDXAry = new sal_Int32[ nDXCount ];
- for ( i = 0; i < nDXCount; i++ )
- aMemoryStream >> pDXAry[ i ];
- aMemoryStream >> nSkipActions;
- pOut->DrawText( aPt, aString, pDXAry );
- delete[] pDXAry;
+
+ if (nStringLen < STRING_MAXLEN)
+ {
+ sal_Unicode* pBuf = aString.AllocBuffer( (xub_StrLen)nStringLen );
+ for ( i = 0; i < nStringLen; i++ )
+ aMemoryStream >> pBuf[ i ];
+ aMemoryStream >> nDXCount;
+ if ( nDXCount )
+ pDXAry = new sal_Int32[ nDXCount ];
+ for ( i = 0; i < nDXCount; i++ )
+ aMemoryStream >> pDXAry[ i ];
+ aMemoryStream >> nSkipActions;
+ pOut->DrawText( aPt, aString, pDXAry );
+ delete[] pDXAry;
+ }
}
}
break;
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/FC-5/openoffice.org.spec,v
retrieving revision 1.683
retrieving revision 1.684
diff -u -r1.683 -r1.684
--- openoffice.org.spec 27 Sep 2006 09:19:23 -0000 1.683
+++ openoffice.org.spec 4 Dec 2006 11:11:05 -0000 1.684
@@ -1,6 +1,6 @@
%define oootag OOB680
%define ooomilestone 5
-%define rh_rpm_release 19
+%define rh_rpm_release 20
%define build_fc5 1
@@ -186,6 +186,7 @@
Patch58: openoffice.org-2.0.4.ooo69213.xmlhelp.db4.patch
Patch59: openoffice.org-2.0.4.ooo69236.slideshow.esccrash.patch
Patch60: openoffice.org-2.0.4.ooo63086.vcl.focusfollowsmouse.patch
+Patch61: openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch
%define instdir %{_libdir}/openoffice.org2.0
@@ -855,6 +856,7 @@
%patch58 -p1 -b .ooo69213.xmlhelp.db4.patch
%patch59 -p1 -b .ooo69236.slideshow.esccrash.patch
%patch60 -p1 -b .ooo63086.vcl.focusfollowsmouse.patch
+%patch61 -p1 -b .ooo70042.wmfoverflow.svtools.patch
%if %{includingexternals}
#start ludicrous workaround
@@ -3300,6 +3302,9 @@
%{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
%changelog
+* Mon Dec 04 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.0.2-5.20
+- Resolves: rhbz#217347 openoffice.org-2.1.0.ooo70042.wmfoverflow.svtools.patch
+
* Wed Sep 27 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.0.2-5.19
- add openoffice.org-2.0.4.ooo69236.slideshow.esccrash.patch for rh#206177#
- add openoffice.org-2.0.4.ooo63086.vcl.focusfollowsmouse.patch for rh#206051#
More information about the fedora-cvs-commits
mailing list