poppler/CairoOutputDev.cc | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 119071cb9a6144b6268a7ff9b6341ad0cc75d9ae
Author: David Benjamin <[email protected]>
Date: Sun Nov 22 20:19:29 2009 +0100
Do not crash on malformed files
bug 24575
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index a19f42c..0f7739a 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -24,6 +24,7 @@
// Copyright (C) 2008 Michael Vrable <[email protected]>
// Copyright (C) 2008 Chris Wilson <[email protected]>
// Copyright (C) 2008 Hib Eris <[email protected]>
+// Copyright (C) 2009 David Benjamin <[email protected]>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -255,6 +256,10 @@ void CairoOutputDev::saveState(GfxState *state) {
void CairoOutputDev::restoreState(GfxState *state) {
LOG(printf ("restore\n"));
+ if (!state->hasSaves()) {
+ error(-1, "restoreState on an empty state stack");
+ return;
+ }
cairo_restore (cairo);
if (cairo_shape)
cairo_restore (cairo_shape);
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler