Bug#805653: liblept4: Wrong file mode in call of fmemopen

2015-11-23 Thread Jeff Breidenbach
Unless this is an emergency, let's wait for the next Leptonica point
release rather than patching into the Debian package. Upstream
has been notified.


Bug#805653: liblept4: Wrong file mode in call of fmemopen

2015-11-20 Thread Stefan Weil
Package: liblept4
Version: 1.72-3
Severity: normal

Dear Maintainer,

liblept4 fails to read any JPEG 2000 file (Jessie) or uses
an inefficient temporary file (1.72-3).

Example output with tesseract + liblept4 1.71-*:

$ tesseract test.jp2 test -l deu-frak hocr
Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
Warning in fgetJp2kResolution: image resolution not found
tesseract: /home/nirgal/openjpeg2-2.1.0/src/lib/openjp2/cio.c:553:
opj_stream_get_number_byte_left: Assertion `p_stream->m_user_data_length
>= (OPJ_UINT64)p_stream->m_byte_offset' failed.

Example output with tesseract + liblept4 1.72-*:

$ tesseract test.jp2 test -l deu-frak hocr
Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
Warning in pixReadMemJp2k: work-around: writing to a temp file
...

Example output with tesseract + liblept4 (fixed):

$ tesseract test.jp2 test -l deu-frak hocr
Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
Info in pixReadStreamJp2k: w = 10032, h = 7280, bps = 8, spp = 1
...

Here is the patch which fixes the problem:

https://github.com/stweil/leptonica/commit/c4386b5d09dbdd1135078a218c167976b3a35eda



-- System Information:
Debian Release: 8.2
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500,
'testing-proposed-updates'), (500, 'stable-updates'), (500,
'proposed-updates'), (500, 'oldstable-updates'), (500,
'oldstable-proposed-updates'), (500, 'testing'), (500, 'stable'), (500,
'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages liblept4 depends on:
ii  libc62.19-18+deb8u1
ii  libgif4  4.1.6-11
ii  libjpeg62-turbo  1:1.3.1-12
ii  libopenjp2-7 2.1.0-2.1
ii  libpng12-0   1.2.50-2+deb8u1
ii  libtiff5 4.0.3-12.3
ii  libwebp5 0.4.3-1.3
ii  zlib1g   1:1.2.8.dfsg-2+b1

liblept4 recommends no packages.

liblept4 suggests no packages.

-- no debconf information