Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6970 closed defect (fixed)

PDS3 reader - trouble with long label arrays

Reported by: thare Owned by: warmerdam
Priority: normal Milestone: 2.2.2
Component: default Version: 2.2.0
Severity: normal Keywords: PDS3 header arrays
Cc:

Description

Looks like a change to the PVL parser nasakeywordhandler.cpp may have introduced a problem with some PDS3 labels. It doesn't appear to be line length issue but a keyword array length issue.

The example header MI_MAP_02_S77E077S78E078SC_OriginalHeader.img (detached from the image to keep it small), will be successfully read using GDAL 2.1.x and lower (gdalinfo). However in 2.2.0 and 2.2.1 it will fail to read.

The example header MI_MAP_02_S77E077S78E078SC_HeaderLinesStripped.img has been stripped of the now offending array keywords so that GDAL 2.2.x works again.

The *.diff file just shows the offending header lines which are now breaking the 2.2.x support.

I tried to nail down the problem by scouring the pdsdataset.cpp and nasakeywordhandler.cpp but I don't see the impacting change...? https://trac.osgeo.org/gdal/changeset?old_path=%2Ftags%2F2.1.4%2Fgdal%2Ffrmts%2Fpds%2Fnasakeywordhandler.cpp&old=39612&new_path=%2Ftags%2F2.2.1%2Fgdal%2Ffrmts%2Fpds%2Fnasakeywordhandler.cpp&new=39612

I am hoping 2.2.x can be fixed to again support MI_MAP_02_S77E077S78E078SC_OriginalHeader.img

thanks - Trent

Attachments (3)

MI_MAP_02_S77E077S78E078SC_OriginalHeader.img (19.3 KB ) - added by thare 7 years ago.
header which no longer has support as of 2.2.x
MI_MAP_02_S77E077S78E078SC_HeaderLinesStripped.img (9.4 KB ) - added by thare 7 years ago.
Header with lines remove to get back 2.2.x support
linesStripped.diff (10.1 KB ) - added by thare 7 years ago.
Difference of the two headers to show the lines

Download all attachments as: .zip

Change History (6)

by thare, 7 years ago

header which no longer has support as of 2.2.x

by thare, 7 years ago

Header with lines remove to get back 2.2.x support

by thare, 7 years ago

Attachment: linesStripped.diff added

Difference of the two headers to show the lines

comment:1 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39616:

PDS: fix parsing of labels with nested list constructs (fixes #6970)

comment:2 by Even Rouault, 7 years ago

In 39617:

PDS: fix parsing of labels with nested list constructs (fixes #6970)

comment:3 by Even Rouault, 7 years ago

Thanks for the initial analysis. That helped narrowing things. I've added a new test case to avoid future regression on such constructs.

Note: See TracTickets for help on using tickets.