[Poppler-bugs] [Bug 54090] Problems sent by Mateusz Jurczyk and Gynvael Coldwind
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Sep 4 01:01:22 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=54090
--- Comment #19 from Thomas Freitag <Thomas.Freitag at alfa.de> 2012-09-04 08:01:22 UTC ---
(In reply to comment #15)
> Created attachment 66577 [details] [review]
> Partial patch for 682.pdf.SIGFPE.f3.1033
>
> This patch fixes a non-fatal bad access in the test to show the "Weird tile
> index in JPX stream" warning by moving a test of an index before using the
> index.
>
> With libopenjpeg, it fails with a divide by 0 in j2k_decode.
>
> Without libopenjpeg, it gets stuck trying to parse a 622236252 x 19 bitmap in
> JBIG2Stream::readGenericBitmap() called by JBIG2Stream::readSymbolDictSeg().
> Is there a way to detect an unrealistically large bitmap?
I don't think that we need a way to detect it, it just takes a while (but TOO
long with valgrind). But if You're patient enough, it will later exit with "Out
of memory" with another JBIG2Bitmap bitmap, therefore I'll change the
constructor in the following way:
// need to allocate one extra guard byte for use in combine()
data = (Guchar *)gmalloc_checkoverflow(h * line + 1);
if (data != NULL) {
data[h * line] = 0;
}
This works for this PDF, and it finishes now without any further problems, but
I want to regtest it first before upload it (next weekend)!
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list