o Under right circumstances, nvdims would return an uninitialized value

(on windows platforms), resulting in a downstream SIGSEGV upon memory
  allocation of 0 bytes.  Gave nvdims a default value of 1. This may not
  be the best possible fix, but in the short term it has fixed the issue.
  The problem would occur when NetCDF was compiled with NetCDF-4 support,
  on Windows, in 64-bit mode, and when nctest/nctest.exe would run.
This commit is contained in:
Ward Fisher 2012-06-11 23:17:20 +00:00
parent 1ca8b5d09c
commit aa33c3c85c

View File

@ -44,7 +44,7 @@ int ncerr = NC_NOERR ;
static size_t
nvdims(int ncid, int varid)
{
int ndims, status;
int ndims=1, status;
if ((status = nc_inq_varndims(ncid, varid, &ndims)))
{