Opened 13 years ago

Closed 13 years ago

#3921 closed defect (fixed)

gdalinfo dumps core on NITF file

Reported by: ReinerBeck Owned by: warmerdam
Priority: normal Milestone: 1.7.3
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: NITF
Cc:

Description

Running gdalinfo on the attached file results in a segmentation fault.

The file as such is pretty useless, as there is no image segment in it. However, gdalinfo should not crash. Btw, the crash happens in my application as well when I try to access this file with GDAL.

> gdalinfo test_stanag4545_nsif.nsf
Warning 1: The file test_stanag4545_nsif.nsf appears to be an NITF file, but no image
blocks were found on it.
Driver: NITF/National Imagery Transmission Format
Files: test_stanag4545_nsif.nsf
Size is 1, 1
Coordinate System is `'
Metadata:
  NITF_FHDR=NSIF01.00
  NITF_CLEVEL=03
  NITF_STYPE=BF01
  NITF_OSTAID=RGES 1
  NITF_FDT=20110111102755
  NITF_FTITLE=
  NITF_FSCLAS=S
  NITF_FSCLSY=NS
  NITF_FSCODE=
  NITF_FSCTLH=
  NITF_FSREL=
  NITF_FSDCTP=
  NITF_FSDCDT=
  NITF_FSDCXM=
  NITF_FSDG=
  NITF_FSDGDT=
  NITF_FSCLTX=
  NITF_FSCATP=
  NITF_FSCAUT=
  NITF_FSCRSN=
  NITF_FSSRDT=
  NITF_FSCTLN=
  NITF_FSCOP=00000
  NITF_FSCPYS=00000
  NITF_ENCRYP=0
  NITF_FBKGC=255,255,255
  NITF_ONAME=
  NITF_OPHONE=
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,    1.0)
Upper Right (    1.0,    0.0)
Lower Right (    1.0,    1.0)
Center      (    0.5,    0.5)
Segmentation fault (core dumped)

The GDAL version is 1.6.2 from the Fedora 13 distro. I had the same core with the older 1.6.0 version.

gdalinfo --version GDAL 1.6.2, released 2009/07/31

Attachments (1)

test_stanag4545_nsif.nsf (388 bytes ) - added by ReinerBeck 13 years ago.

Download all attachments as: .zip

Change History (2)

by ReinerBeck, 13 years ago

Attachment: test_stanag4545_nsif.nsf added

comment:1 by warmerdam, 13 years ago

Milestone: 1.7.3
Resolution: fixed
Status: newclosed

While this bug exists in the 1.6 branch it appears to be already corrected in 1.7.x and later. At this point I'm not inclined to port modest valued bug fixes all the way back to 1.6.

Note: See TracTickets for help on using tickets.