[poppler] poppler/poppler: CairoOutputDev.cc,1.41,1.42

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Wed Sep 6 21:01:41 PDT 2006


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv12938/poppler

Modified Files:
	CairoOutputDev.cc 
Log Message:
2006-09-06  Jeff Muizelaar  <jeff at infidigm.net>

	* poppler/CairoOutputDev.cc: Avoid crashing in CairoOutputDev if
	endString is called without a corresponding beginString. Fixes #4515.


Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.cc,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- CairoOutputDev.cc	5 Sep 2006 01:21:50 -0000	1.41
+++ CairoOutputDev.cc	7 Sep 2006 04:01:39 -0000	1.42
@@ -395,7 +395,13 @@
 
   if (!currentFont)
     return;
-   
+
+  // endString can be called without a corresponding beginString. If this
+  // happens glyphs will be null so don't draw anything, just return.
+  // XXX: OutputDevs should probably not have to deal with this...
+  if (!glyphs)
+    return;
+
   // ignore empty strings and invisible text -- this is used by
   // Acrobat Capture
   render = state->getRender();



More information about the poppler mailing list