This fixes a segmentation fault in the code. -- Rogério Brito : rbr...@{ime.usp.br,gmail.com} : GPG key 1024D/7C2CAEB8 http://rb.doesntexist.org : Packages for LaTeX : algorithms.berlios.de DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
#! /bin/sh /usr/share/dpatch/dpatch-run ## fix-462544.dpatch from Jiri Palecek <jpale...@web.de> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix segmentation fault in image handling
@DPATCH@ --- a/xpdf/SplashOutputDev.cc +++ b/xpdf/SplashOutputDev.cc @@ -2475,14 +2475,14 @@ tx = (int)floor(xMin); if (tx < 0) { tx = 0; - } else if (tx > bitmap->getWidth()) { - tx = bitmap->getWidth(); + } else if (tx >= bitmap->getWidth()) { + tx = bitmap->getWidth()-1; } ty = (int)floor(yMin); if (ty < 0) { ty = 0; - } else if (ty > bitmap->getHeight()) { - ty = bitmap->getHeight(); + } else if (ty >= bitmap->getHeight()) { + ty = bitmap->getHeight()-1; } w = (int)ceil(xMax) - tx + 1; if (tx + w > bitmap->getWidth()) {