Hello,
It seems to me that there is a bug in int NCDEFAULT_put_varm(...)
(located in libdispatch/var.c around line 515).
According the the C API manual, stride = NULL is an acceptable
argument interpreted as (1, 1, 1, ...).
Looking that at around line 611
/*
* Verify stride argument.
*/
if(stride != NULL)
stride1 = 1;
for (idim = 0; idim <= maxidim; ++idim)
{
if ((stride[idim] == 0)
/* cast needed for braindead systems with signed size_t */
|| ((unsigned long) stride[idim] >= X_INT_MAX))
{
return NC_ESTRIDE;
}
if(stride[idim] != 1) stride1 = 0;
}
note that the if-clause seems to be missing { and }. As it stands, the
for-loop is executed even if stride==NULL, causing a segfault at "if
((stride[idim] == 0)" (line 615).
Thanks!
--
Constantine