[okular] [Bug 462304] Okular and other poppler related tools cannot handle some pdf pages

Nicolas Fella bugzilla_noreply at kde.org
Sun Nov 27 14:33:26 GMT 2022


https://bugs.kde.org/show_bug.cgi?id=462304

Nicolas Fella <nicolas.fella at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.fella at gmx.de
     Ever confirmed|0                           |1
             Status|REPORTED                    |CONFIRMED

--- Comment #4 from Nicolas Fella <nicolas.fella at gmx.de> ---
When opening that file poppler prints "Bogus memory allocation size".
Presumably because the embedded image data is too large in some way.

The allocation seems to come from
https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/poppler/JBIG2Stream.cc#L1575

numInputSyms is 0, numNewSyms is 3092673499. 3092673499 is larger than 2^31 and
smaller than 2^32. It is stored as unsigned int, so that's fine, but when
passing that to gmallocn_checkoverflow it gets converted to int causing an
overflow. Once it reaches
https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/goo/gmem.h#L112
count is -1202293797 and the allocation fails

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list