Opened 13 years ago

Closed 13 years ago

#1640 closed defect (fixed)

Remove 500 char limit on HFA metadata reads and allow updates

Reported by: Sam Gillingham Owned by: warmerdam
Priority: normal Milestone: 1.4.2
Component: GDAL_Raster Version: 1.4.1
Severity: normal Keywords: HFA
Cc:

Description

The attached proposed patch resolves 2 issues with the HFA metadata:

  1. You cannot read more than 500 characters of data. However, since the metadata is written to a GDAL specific node and GDAL sets the maxNumChars field we can safely rely on this field to tell us how many characters to read.
  1. When updating the HFA file and overwriting metadata, duplicate nodes get created. This crashes Imagine. The patch checks for their existance before creating new ones.

Attachments (1)

hfaopen.cpp.patch (5.9 KB) - added by Sam Gillingham 13 years ago.
proposed patch

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Sam Gillingham

Attachment: hfaopen.cpp.patch added

proposed patch

comment:1 Changed 13 years ago by warmerdam

Keywords: HFA added
Resolution: fixed
Status: newclosed

sues confirmed.

Patch applied in trunk (r11542) with some adjustments for code style, and simplification.

Test script (autotest/gdrivers/hfa.py) extended with a couple metadata related checks to regression test this change.

Patch merged into 1.4 and 1.4-esri branches.

Thanks Sam!

Note: See TracTickets for help on using tickets.