splash/Splash.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 71c1d162477a243db07b62ef3c056a2946f8986e Merge: 7d1de78 678c767 Author: Albert Astals Cid <[email protected]> Date: Sun Aug 18 16:41:20 2013 +0200 Merge remote-tracking branch 'origin/poppler-0.24' commit 7d1de78ad79162217ee0ca6c2e99ce51017a327d Merge: 7e0d969 fbea224 Author: Albert Astals Cid <[email protected]> Date: Sun Aug 18 16:40:34 2013 +0200 Merge commit 'origin/poppler-0.24~1' This is merging the revert commits with the "ours" strategy, so it's virtually doing nothing other than making the stable branch mergeable again to master commit 678c767584fa80620cc58a1d8a913cb3473209d4 Author: Albert Astals Cid <[email protected]> Date: Sun Aug 18 16:19:27 2013 +0200 Fix crash in 1026.asan.0.42.pdf We were not checking that bitmapOff was in bounds diff --git a/splash/Splash.cc b/splash/Splash.cc index ccfe1ed..d5aec8f 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -5420,6 +5420,7 @@ GBool Splash::gouraudTriangleShadedFill(SplashGouraudColor *shading) SplashClip* clip = getClip(); SplashBitmap *blitTarget = bitmap; SplashColorPtr bitmapData = bitmap->getDataPtr(); + int bitmapOffLimit = bitmap->getHeight() * bitmap->getRowSize(); SplashColorPtr bitmapAlpha = bitmap->getAlphaPtr(); SplashColorPtr cur = NULL; SplashCoord* userToCanvasMatrix = getMatrix(); @@ -5652,7 +5653,7 @@ GBool Splash::gouraudTriangleShadedFill(SplashGouraudColor *shading) colorinterp = scanColorMap[0] * scanLimitL + scanColorMap[1]; bitmapOff = scanLineOff + scanLimitL * colorComps; - for (int X = scanLimitL; X <= scanLimitR; ++X, colorinterp += scanColorMap[0], bitmapOff += colorComps) { + for (int X = scanLimitL; X <= scanLimitR && bitmapOff + colorComps <= bitmapOffLimit; ++X, colorinterp += scanColorMap[0], bitmapOff += colorComps) { // FIXME : standard rectangular clipping can be done for a // complete scanline which is faster // --> see SplashClip and its methods commit fbea2241cccdde0106d2c34592b6ddda28a8d848 Author: Albert Astals Cid <[email protected]> Date: Sat Aug 17 01:32:51 2013 +0200 Revert "Tagged-PDF: Accessors in Catalog for the MarkInfo dictionary" This reverts commit 402ee8b4e31630a42a0a38db1d39164cc5789f3c. No clue how this ended up in the stable branch diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc index 25a8997..6bd511a 100644 --- a/poppler/Catalog.cc +++ b/poppler/Catalog.cc @@ -97,7 +97,6 @@ Catalog::Catalog(PDFDoc *docA) { attrsList = NULL; kidsIdxList = NULL; lastCachedPage = 0; - markInfo = markInfoNull; xref->getCatalog(&catDict); if (!catDict.isDict()) { @@ -858,50 +857,6 @@ Object *Catalog::getStructTreeRoot() return &structTreeRoot; } -Guint Catalog::getMarkInfo() -{ - if (markInfo == markInfoNull) { - markInfo = 0; - - Object catDict; - catalogLocker(); - xref->getCatalog(&catDict); - - if (catDict.isDict()) { - Object markInfoDict; - catDict.dictLookup("MarkInfo", &markInfoDict); - if (markInfoDict.isDict()) { - Object value; - - if (markInfoDict.dictLookup("Marked", &value)->isBool() && value.getBool()) - markInfo |= markInfoMarked; - else if (!value.isNull()) - error(errSyntaxError, -1, "Marked object is wrong type ({0:s})", value.getTypeName()); - value.free(); - - if (markInfoDict.dictLookup("Suspects", &value)->isBool() && value.getBool()) - markInfo |= markInfoSuspects; - else if (!value.isNull()) - error(errSyntaxError, -1, "Suspects object is wrong type ({0:s})", value.getTypeName()); - value.free(); - - if (markInfoDict.dictLookup("UserProperties", &value)->isBool() && value.getBool()) - markInfo |= markInfoUserProperties; - else if (!value.isNull()) - error(errSyntaxError, -1, "UserProperties object is wrong type ({0:s})", value.getTypeName()); - value.free(); - } else if (!markInfoDict.isNull()) { - error(errSyntaxError, -1, "MarkInfo object is wrong type ({0:s})", markInfoDict.getTypeName()); - } - markInfoDict.free(); - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - } - catDict.free(); - } - return markInfo; -} - Object *Catalog::getOutline() { catalogLocker(); diff --git a/poppler/Catalog.h b/poppler/Catalog.h index a89d9aa..24a3dcf 100644 --- a/poppler/Catalog.h +++ b/poppler/Catalog.h @@ -125,15 +125,6 @@ public: // Return the structure tree root object. Object *getStructTreeRoot(); - // Return values from the MarkInfo dictionary as flags in a bitfield. - enum MarkInfoFlags { - markInfoNull = 1 << 0, - markInfoMarked = 1 << 1, - markInfoUserProperties = 1 << 2, - markInfoSuspects = 1 << 3, - }; - Guint getMarkInfo(); - // Find a page, given its object ID. Returns page number, or 0 if // not found. int findPage(int num, int gen); @@ -228,7 +219,6 @@ private: GooString *baseURI; // base URI for URI-type links Object metadata; // metadata stream Object structTreeRoot; // structure tree root dictionary - Guint markInfo; // Flags from MarkInfo dictionary Object outline; // outline dictionary Object acroForm; // AcroForm dictionary Object viewerPreferences; // ViewerPreference dictionary commit 6d2771b8a8c0cb0f2288d0900fea3c9edc3dd172 Author: Albert Astals Cid <[email protected]> Date: Sat Aug 17 01:32:38 2013 +0200 Revert "pdfinfo: Use Catalog::getMarkInfo() to show mark info properties" This reverts commit 73cca518c479594e26605196d54b429fbf42dcdc. No clue how this ended up in the stable branch diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc index f297614..14e4f6c 100644 --- a/utils/pdfinfo.cc +++ b/utils/pdfinfo.cc @@ -225,12 +225,8 @@ int main(int argc, char *argv[]) { info.free(); // print tagging info - printf("Tagged: %s\n", - (doc->getCatalog()->getMarkInfo() & Catalog::markInfoMarked) ? "yes" : "no"); - printf("UserProperties: %s\n", - (doc->getCatalog()->getMarkInfo() & Catalog::markInfoUserProperties) ? "yes" : "no"); - printf("Suspects: %s\n", - (doc->getCatalog()->getMarkInfo() & Catalog::markInfoSuspects) ? "yes" : "no"); + printf("Tagged: %s\n", + doc->getStructTreeRoot()->isDict() ? "yes" : "no"); // print form info switch (doc->getCatalog()->getFormType()) _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
