[poppler] poppler/poppler: Page.cc,1.12.2.1,1.12.2.2

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Mar 8 05:42:33 PST 2007


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

Modified Files:
      Tag: POPPLER_0_5_X
	Page.cc 
Log Message:
        * poppler/Page.cc: Consider 0x0 boxes as invalid. Fixes
       http://bugzilla.gnome.org/show_bug.cgi?id=408682


Index: Page.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Page.cc,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -d -r1.12.2.1 -r1.12.2.2
--- Page.cc	22 Dec 2006 23:37:53 -0000	1.12.2.1
+++ Page.cc	8 Mar 2007 13:42:31 -0000	1.12.2.2
@@ -37,6 +37,7 @@
 
 PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
   Object obj1;
+  PDFRectangle mBox;
 
   // get old/default values
   if (attrs) {
@@ -59,7 +60,9 @@
   }
 
   // media box
-  readBox(dict, "MediaBox", &mediaBox);
+  if (readBox(dict, "MediaBox", &mBox)) {
+    mediaBox = mBox;
+  }
 
   // crop box
   if (readBox(dict, "CropBox", &cropBox)) {
@@ -168,6 +171,8 @@
       ok = gFalse;
     }
     obj2.free();
+    if (tmp.x1 == 0 && tmp.x2 == 0 && tmp.y1 == 0 && tmp.y2 == 0)
+      ok = gFalse;
     if (ok) {
       if (tmp.x1 > tmp.x2) {
 	t = tmp.x1; tmp.x1 = tmp.x2; tmp.x2 = t;



More information about the poppler mailing list