[poppler] Branch 'poppler-0.14' - 4 commits - poppler/SplashOutputDev.cc splash/Splash.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Oct 27 14:48:57 PDT 2010
poppler/SplashOutputDev.cc | 11 +++++++++++
splash/Splash.cc | 6 ++++++
2 files changed, 17 insertions(+)
New commits:
commit 44aed9b9725197d16167319cb72b8c3a63596b3e
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Oct 27 22:43:51 2010 +0100
fix comment
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index f6813a3..c85d481 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1818,12 +1818,12 @@ void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
}
if (unlikely(t3GlyphStack->origBitmap != NULL)) {
- error(-1, "t3GlyphStack orig Bitmap was not null in SplashOutputDev::type3D1");
+ error(-1, "t3GlyphStack origBitmap was not null in SplashOutputDev::type3D1");
return;
}
if (unlikely(t3GlyphStack->origSplash != NULL)) {
- error(-1, "t3GlyphStack orig Bitmap was not null in SplashOutputDev::type3D1");
+ error(-1, "t3GlyphStack origSplash was not null in SplashOutputDev::type3D1");
return;
}
commit 7b99f88cc55156c794ce073bb1f5eb49107e2698
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Oct 27 22:36:07 2010 +0100
Fix memory leaks that can happen with broken documents
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index b862816..f6813a3 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1817,6 +1817,16 @@ void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
return;
}
+ if (unlikely(t3GlyphStack->origBitmap != NULL)) {
+ error(-1, "t3GlyphStack orig Bitmap was not null in SplashOutputDev::type3D1");
+ return;
+ }
+
+ if (unlikely(t3GlyphStack->origSplash != NULL)) {
+ error(-1, "t3GlyphStack orig Bitmap was not null in SplashOutputDev::type3D1");
+ return;
+ }
+
t3Font = t3GlyphStack->cache;
// check for a valid bbox
commit ac13c6811cf51831365e6b45c40b8ec38495b3fb
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Oct 27 20:40:19 2010 +0100
Fix memory leak
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 9803906..b862816 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2950,6 +2950,7 @@ void SplashOutputDev::endTransparencyGroup(GfxState *state) {
double *ctm;
// restore state
+ delete bitmap;
delete splash;
bitmap = transpGroupStack->origBitmap;
splash = transpGroupStack->origSplash;
commit 45fbd7fa42cadcebced92360f779e2d12bbd4685
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Oct 27 20:39:48 2010 +0100
Do not crash if bitmap->alpha == NULL
Happens in broken files
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 075971d..860e217 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -29,6 +29,7 @@
#include <string.h>
#include <limits.h>
#include "goo/gmem.h"
+#include "poppler/Error.h"
#include "SplashErrorCodes.h"
#include "SplashMath.h"
#include "SplashBitmap.h"
@@ -3067,6 +3068,11 @@ void Splash::compositeBackground(SplashColorPtr color) {
Guchar color3;
#endif
int x, y, mask;
+
+ if (unlikely(bitmap->alpha == NULL)) {
+ error(-1, "bitmap->alpha is NULL in Splash::compositeBackground");
+ return;
+ }
switch (bitmap->mode) {
case splashModeMono1:
More information about the poppler
mailing list