[ooo-build-commit] .: Branch 'ooo-build-3-2' - patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Wed Feb 3 10:41:32 PST 2010
patches/dev300/apply | 1 +
patches/dev300/vcl-pngread-greypalette-fix.diff | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
New commits:
commit 4d9c193905ee7d7de8d9f3bcd449e73ba14cdd07
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Wed Feb 3 13:10:42 2010 +0100
Handle corner case in vcl's greypalette init
* patches/dev300/apply: added the patch
* patches/dev300/vcl-pngread-greypalette-fix.diff: don't divide by
zero in greypalette init, bail out early in chunk reader
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 87ef996..21c18e9 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3532,6 +3532,7 @@ evaluation-row-limit.diff
valgrind-fixes.diff, thorsten
sd-avoid-looping-fix.diff, thorsten
svx-validate-paradepth.diff, thorsten
+vcl-pngread-greypalette-fix.diff, thorsten
[ Fixes < ooo320-m12 ]
vcl-drawtransparent-fix.diff, i#107763, thorsten
diff --git a/patches/dev300/vcl-pngread-greypalette-fix.diff b/patches/dev300/vcl-pngread-greypalette-fix.diff
new file mode 100644
index 0000000..2f2d2e9
--- /dev/null
+++ b/patches/dev300/vcl-pngread-greypalette-fix.diff
@@ -0,0 +1,23 @@
+diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
+index fe559f5..de2ddf7 100644
+--- vcl/source/gdi/pngread.cxx
++++ vcl/source/gdi/pngread.cxx
+@@ -376,6 +376,9 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
+ // parse the chunks
+ while( mbStatus && !mbIDAT && ReadNextChunk() )
+ {
++ if( !mbStatus )
++ break;
++
+ switch( mnChunkType )
+ {
+ case PNGCHUNK_IHDR :
+@@ -706,7 +709,7 @@ void PNGReaderImpl::ImplGetGrayPalette( sal_uInt16 nBitDepth )
+ nBitDepth = 8;
+
+ sal_uInt16 nPaletteEntryCount = 1 << nBitDepth;
+- sal_uInt32 nAdd = 256 / (nPaletteEntryCount - 1);
++ sal_uInt32 nAdd = nBitDepth ? 256 / (nPaletteEntryCount - 1) : 0;
+
+ // no bitdepth==2 available
+ // but bitdepth==4 with two unused bits is close enough
More information about the ooo-build-commit
mailing list