Fix for GeoJP2 patch provided in NMU 1.900.1-6.1

Bug #505173 reported by Mateusz Łoskot on 2010-01-09
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
jasper (Ubuntu)
Undecided
Unassigned

Bug Description

The purpose of this report is to forward an important fix to JasPer library form Debian to Ubuntu 9.10 for JasPer 1.900.1-6.
The fix is an important one to GIS users and developers based on Ubuntu 9.10 distribution. It looks like the current development version of Ubuntu Lynx does includes this fix. It would be highly appreciated if the fix is backported to Karmic as well.

Original report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553429

Debian Bug report logs - #553429
jasper: Fix for GeoJP2 patch provided in NMU 1.900.1-6.1

Package: jasper
Version: 1.900.1-6
Severity: important

As quoted from Even Roualt of GDAL group:

---
The current http://ftp.de.debian.org/debian/pool/main/j/jasper/jasper_1.900.1-6.diff.gz patch, for the GeoJP2 part, is incorrect in jp2_cod.h and jp2_cod.c. It doesn't match with the reference patch for GeoJP2 against Jasper 1.900.1 made by Andrey Kiselev (ftp://ftp.remotesensing.org/gdal/jasper-1.900.1.uuid.tar.gz)

Debian's patch adds a 'data_len' field in jp2_box_t structure, that is a duplicate with datalen which exists now in upstream 1.900.1 but did not exist in 1.700.1. I think the error was due to an incorrect port from Andrey's original patch for 1.700.1 to 1.900.1

So basically the jp2_box_t structure definition in Debian's current patched jasper doesn't match with the jp2_box_t structure definition in GDAL jpeg2000dataset.cpp... which obviously leads to segfaults when I open a JP2 file with Debian patched Jasper.
---

Ilya Barygin (randomaction) wrote :

Could you please complete step 2 (and possibly others) of https://wiki.ubuntu.com/StableReleaseUpdates#Procedure ?

Mateusz Łoskot (mloskot) wrote :

I'm not really able to provide any more information than what's given in the Debian's report.

1. Statement explaining the impact: no idea, besides that JasPer UUID handling is buggy in current Ubuntu 9.10, so impact may be significant to those who rely on JasPer library (i.e. GDAL tools set).

2. How the bug has been addressed: probably includes this patch already, ported from Debian package.

3. The patch (URL) is included in the Debian's report.

4. The test case would not be trivial, but a complex program. One way is to run unit tests of GDAL (http://www.gdal.org) and observe JasPer throws segmentation fault because of the issue explained in the original report submitted to Debian.

5. No idea.

Andrew Dodd (atd7) wrote :

Test case, assuming that I am encountering the same bug:

Download New York GIS orthoimagery from http://www.nysgis.state.ny.us/gateway/mg/2006/tioga/ - I know without a doubt the files in the Owego dataset cause anything based on JasPer to segfault

Attempt to load these files with anything based on JasPer. So far I have seen segfaults using:
MapTiler to load any of the JP2 files included in the above referenced dataset
executing 'mogrify -format jpg *.jp2' to convert all files to JPEG

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers