shithub: jbig2

Download patch

ref: 7850aaff3651de4a4e7a6be1ac37f61bd9767055
parent: 3e6c1b0670740be3b138228dcc134bf5e6c1eceb
author: Math <mlafon@gmail.com>
date: Thu Feb 28 19:56:04 EST 2013

Bug 693507: check for out-of-bounds access

Report error in get_next_word() functions on out-of-bounds access and
handling of this error in both arithmetic and huffman decoders.

When decoding a corrupted document, the arithmetic decoder can hit the end
of the Jbig2 stream. The problem was that get_next_word() returned 0 in
that case and that this lead to an infinite loop.