diff -u cups-1.4.6/debian/changelog cups-1.4.6/debian/changelog --- cups-1.4.6/debian/changelog +++ cups-1.4.6/debian/changelog @@ -1,3 +1,12 @@ +cups (1.4.6-5ubuntu1.3) natty-proposed; urgency=low + + * debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx: Fixed + memory leak in pdftopdf filter which made the filter taking up several + gigabytes when processing certain PDF files. Thanks to upstream + author Koji Otani for the quick fix (LP: #790378). + + -- Till Kamppeter Fri, 3 Jun 2011 10:51:59 +0200 + cups (1.4.6-5ubuntu1.2) natty-proposed; urgency=low * debian/local/pstopdf.convs, debian/local/pstopdf.types: Do not apply diff -u cups-1.4.6/debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx cups-1.4.6/debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx --- cups-1.4.6/debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx +++ cups-1.4.6/debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx @@ -179,13 +179,24 @@ P2PForm *form; xobjDict->getVal(i,&xobj); - if (!xobj.isStream()) continue; + if (!xobj.isStream()) { + xobj.free(); + continue; + } strDict = xobj.streamGetDict(); strDict->lookupNF("Subtype",&obj); - if (!obj.isName() || strcmp("Form",obj.getName()) != 0) continue; + if (!obj.isName() || strcmp("Form",obj.getName()) != 0) { + obj.free(); + xobj.free(); + continue; + } obj.free(); strDict->lookupNF("Resources",&obj); - if (!obj.isNull()) continue; + if (!obj.isNull()) { + obj.free(); + xobj.free(); + continue; + } /* found a Form without Resource, replace it with a refrence to a P2PForm */ form = new P2PForm(&xobj,this,map);