[poppler] 3 commits - poppler/SplashOutputDev.cc splash/Splash.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Oct 27 14:40:11 PDT 2010
poppler/SplashOutputDev.cc | 11 +++++++++++
splash/Splash.cc | 6 ++++++
2 files changed, 17 insertions(+)
New commits:
commit 4ef38cc99a879202e717447a422272cf85eeccfc
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 1a40bc5..54f0119 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1809,6 +1809,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 fdfffc9c68314d3f64dee7e0ef8617105e3198dd
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 05bc7ae..1a40bc5 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2959,6 +2959,7 @@ void SplashOutputDev::endTransparencyGroup(GfxState *state) {
double *ctm;
// restore state
+ delete bitmap;
delete splash;
bitmap = transpGroupStack->origBitmap;
splash = transpGroupStack->origSplash;
commit 90d479d9d5c947175e60ab689f440ae9c24f0b2b
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 5e27d42..d3e48fa 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -30,6 +30,7 @@
#include <limits.h>
#include "goo/gmem.h"
#include "goo/GooLikely.h"
+#include "poppler/Error.h"
#include "SplashErrorCodes.h"
#include "SplashMath.h"
#include "SplashBitmap.h"
@@ -3065,6 +3066,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