Commit f04e2c4f authored by Albert Astals Cid's avatar Albert Astals Cid

Jeff Muizelaar's improvements to my yesterday's small patches

parent 33e98f81
2006-02-06 Albert Astals Cid <aacid@kde.org>
* poppler/Annot.cc: Fix small leaks
* poppler/JBIG2Stream.cc: Remove check improving as really did not
improve anything
2006-02-05 Albert Astals Cid <aacid@kde.org>
* poppler/Gfx.cc: Fix small leak
......
......@@ -211,15 +211,14 @@ void Annot::generateAppearance(Dict *acroForm, Dict *dict) {
// build the appearance stream dictionary
appearDict.initDict(xref);
appearDict.dictAdd(copyString("Length"),
obj1.initInt(appearBuf->getLength()));
appearDict.dictAdd(copyString("Subtype"), obj1.initName("Form"));
appearDict.dictAdd("Length", obj1.initInt(appearBuf->getLength()));
appearDict.dictAdd("Subtype", obj1.initName("Form"));
obj1.initArray(xref);
obj1.arrayAdd(obj2.initReal(0));
obj1.arrayAdd(obj2.initReal(0));
obj1.arrayAdd(obj2.initReal(xMax - xMin));
obj1.arrayAdd(obj2.initReal(yMax - yMin));
appearDict.dictAdd(copyString("BBox"), &obj1);
appearDict.dictAdd("BBox", &obj1);
// find the resource dictionary
dict->lookup("DR", &drObj);
......@@ -244,7 +243,7 @@ void Annot::generateAppearance(Dict *acroForm, Dict *dict) {
}
}
if (drObj.isDict()) {
appearDict.dictAdd(copyString("Resources"), drObj.copy(&obj1));
appearDict.dictAdd("Resources", drObj.copy(&obj1));
}
drObj.free();
......
......@@ -2325,7 +2325,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
error(getPos(), "Bad size in JBIG2 halftone segment");
return;
}
if (h < 0 || w == 0 || h >= INT_MAX / w) {
if (w == 0 || h >= INT_MAX / w) {
error(getPos(), "Bad size in JBIG2 bitmap segment");
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment