ooo-build r12932 - in trunk: . patches/dev300
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12932 - in trunk: . patches/dev300
- Date: Fri, 20 Jun 2008 08:57:04 +0000 (UTC)
Author: thorstenb
Date: Fri Jun 20 08:57:04 2008
New Revision: 12932
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12932&view=rev
Log:
* patches/dev300/vcl-png-import-fix.diff:
* patches/dev300/apply: fixed crash in png import
Added:
trunk/patches/dev300/vcl-png-import-fix.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Fri Jun 20 08:57:04 2008
@@ -2204,7 +2204,7 @@
cppcanvas-fix-roundcorners.diff, rodo
slideshow-media-control.diff, thorsten
vcl-linking-randr.diff, i#89718, n#398244, thorsten
-
+vcl-png-import-fix.diff, n#397128, i#90913, thorsten
[ LocalizeFixes ]
# it is Y axis, not X one [in Spanish]
Added: trunk/patches/dev300/vcl-png-import-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/vcl-png-import-fix.diff Fri Jun 20 08:57:04 2008
@@ -0,0 +1,62 @@
+ vcl/source/gdi/pngread.cxx | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
+index da84b00..9271c4b 100644
+--- vcl/source/gdi/pngread.cxx
++++ vcl/source/gdi/pngread.cxx
+@@ -1045,6 +1045,7 @@ bool PNGReaderImpl::ImplPreparePass()
+
+ void PNGReaderImpl::ImplApplyFilter()
+ {
++ OSL_ASSERT(mnScansize>=mnBPP+1);
+ const BYTE* const pScanEnd = mpInflateInBuf + mnScansize;
+
+ BYTE nFilterType = *mpInflateInBuf; // the filter type may change each scanline
+@@ -1074,9 +1075,11 @@ void PNGReaderImpl::ImplApplyFilter()
+ const BYTE* p2 = mpScanPrior + 1;
+
+ // use pixels from prior line
+- do
++ while( p1 < pScanEnd )
++ {
+ *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+- while( ++p1 < pScanEnd );
++ ++p1;
++ }
+ }
+ break;
+
+@@ -1091,9 +1094,11 @@ void PNGReaderImpl::ImplApplyFilter()
+ *p1 = static_cast<BYTE>( *p1 + (*p2 >> 1) );
+
+ // predict by averaging the left and prior line pixels
+- do
++ while( p1 < pScanEnd )
++ {
+ *p1 = static_cast<BYTE>( *p1 + ((*(p2++) + *(p3++)) >> 1) );
+- while( ++p1 < pScanEnd );
++ ++p1;
++ }
+ }
+ break;
+
+@@ -1109,7 +1114,7 @@ void PNGReaderImpl::ImplApplyFilter()
+ *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+
+ // predict by using the left and the prior line pixels
+- do
++ while( p1 < pScanEnd )
+ {
+ int na = *(p2++);
+ int nb = *(p3++);
+@@ -1132,8 +1137,8 @@ void PNGReaderImpl::ImplApplyFilter()
+ na = nc;
+
+ *p1 = static_cast<BYTE>( *p1 + na );
++ ++p1;
+ }
+- while( ++p1 < pScanEnd );
+ }
+ break;
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]