mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
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:
parent
1ca8b5d09c
commit
aa33c3c85c
@ -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)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user