Opened 9 years ago

Closed 9 years ago

#5962 closed defect (fixed)

gdalinfo segmentation fault reading NetCDF + CF grid

Reported by: halfnelson Owned by: warmerdam
Priority: normal Milestone: 1.11.3
Component: default Version: 1.11.2
Severity: normal Keywords: netcdf, cf, gdalinfo, segmentation fault, segfault, seg fault


I posted this issue as a qgis bug yesterday, here:

and it was brought to my attention that it can be demonstrated with gdalinfo, so gdal is the likely culprit.

The test file is here:

Here are a few results from different systems:

OSX 10.9.5 (Mavericks): galinfo 1.9.1 - works
OSX 10.9.5 (Mavericks): gdalinfo 1.11.0 - segfault
Centos 6.6: gdalinfo 1.9.2 - works
Ubuntu 14.04.2: gdalinfo 1.11.2 - segfault

One cut-and-paste:

$ gdalinfo
Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
Segmentation fault (core dumped)

And just for the record, that warning seems wrong:

$ ncdump -h | grep -2 Conventions
global attributes:

string :format_version = "NOHRSC NetCDF raster file v1.2" ;
string :Conventions = "CF-1.6" ;
string :title = "The NOHRSC Snowfall Analysis, Version 1, is a 2-pass Barnes interpolation of snowfall observations, typically covering a 24-hour duration, performed daily on a 144 arc-second (0.04 degree) longitude/latitude grid over the Conterminous United States. This file provides a 213-day aggregation of 24-hour analysis results, not an independent 213-day analysis." ;
string :source = "ground observations of snowfall" ;

Change History (1)

comment:1 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

trunk r29200, branches/1.11 r29201 "NetCDF: fix crash on opening a NOAA dataset (#5962)"

Note: See TracTickets for help on using tickets.