Index: CairoOutputDev.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.cc,v retrieving revision 1.34 diff -u -p -r1.34 CairoOutputDev.cc --- CairoOutputDev.cc 12 Apr 2006 06:52:07 -0000 1.34 +++ CairoOutputDev.cc 27 Apr 2006 08:34:24 -0000 @@ -525,11 +525,15 @@ void CairoOutputDev::drawImageMask(GfxSt image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_A8, width, height, row_stride); - if (image == NULL) + if (image == NULL) { + delete imgStr; return; + } pattern = cairo_pattern_create_for_surface (image); - if (pattern == NULL) + if (pattern == NULL) { + delete imgStr; return; + } cairo_matrix_invert (&matrix); cairo_pattern_set_matrix (pattern, &matrix); @@ -624,12 +628,16 @@ void CairoOutputDev::drawMaskedImage(Gfx image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_RGB24, width, height, width * 4); - if (image == NULL) + if (image == NULL) { + delete imgStr; return; + } pattern = cairo_pattern_create_for_surface (image); maskPattern = cairo_pattern_create_for_surface (maskImage); - if (pattern == NULL) + if (pattern == NULL) { + delete imgStr; return; + } ctm = state->getCTM(); LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n", @@ -735,12 +743,16 @@ void CairoOutputDev::drawSoftMaskedImage image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_RGB24, width, height, width * 4); - if (image == NULL) + if (image == NULL) { + delete imgStr; return; + } pattern = cairo_pattern_create_for_surface (image); maskPattern = cairo_pattern_create_for_surface (maskImage); - if (pattern == NULL) + if (pattern == NULL) { + delete imgStr; return; + } ctm = state->getCTM(); LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n", @@ -843,11 +855,15 @@ void CairoOutputDev::drawImage(GfxState width, height, width * 4); } - if (image == NULL) - return; + if (image == NULL) { + delete imgStr; + return; + } pattern = cairo_pattern_create_for_surface (image); - if (pattern == NULL) + if (pattern == NULL) { + delete imgStr; return; + } ctm = state->getCTM(); LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n", Index: JBIG2Stream.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/JBIG2Stream.cc,v retrieving revision 1.8 diff -u -p -r1.8 JBIG2Stream.cc --- JBIG2Stream.cc 5 Apr 2006 18:20:56 -0000 1.8 +++ JBIG2Stream.cc 27 Apr 2006 08:34:24 -0000 @@ -2420,6 +2420,7 @@ void JBIG2Stream::readHalftoneRegionSeg( } } } + delete skipBitmap; } // read the gray-scale image Index: PageLabelInfo.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/PageLabelInfo.cc,v retrieving revision 1.4 diff -u -p -r1.4 PageLabelInfo.cc --- PageLabelInfo.cc 28 Feb 2006 18:25:00 -0000 1.4 +++ PageLabelInfo.cc 27 Apr 2006 08:34:24 -0000 @@ -71,7 +71,7 @@ static void toRoman(int number, GooStrin wh = lowercaseNumerals; divisor = 1000; - for (k = 3; k >= 0; k--) { + for (k = 2; k >= 0; k--) { i = number / divisor; number = number % divisor; @@ -83,7 +83,7 @@ static void toRoman(int number, GooStrin break; case 9: str->append(wh[2 * k + 0]); - str->append(wh[ 2 * k + 2]); + str->append(wh[2 * k + 2]); break; case 4: str->append(wh[2 * k + 0]);