-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: accessing unset entries in VLEN variable causes crash #221
Comments
Ok, I've duplicated the issue with a new test in the C library in We can mitigate the issue by changing the dimension length to fixed from The crash itself is happening in /* Copy the fill value into the rest of the data buffer. */
filldata = (char *)data + real_data_size;
for (i = 0; i < fill_len; i++)
{
if (var->type_info->nc_type_class == NC_STRING)
{
if (*(char **)fillvalue)
{
if (!(*(char **)filldata = strdup(*(char **)fillvalue)))
BAIL(NC_ENOMEM);
}
else
*(char **)filldata = NULL;
}
else
memcpy(filldata, fillvalue, file_type_size); // <--- Crash Here
filldata = (char *)filldata + file_type_size;
}
} A fix is still pending; I need to determine if the error is in how the file is written or if it's in how the file is being read. |
CC'ing @DennisHeimbigner in case anything leaps out to a more experienced eye. |
In the example above, |
…her issues into ncdump. Broader validation pending.
Ok, there is/was a logic flaw when using an
Hopefully we should have the fix in the master branch fairly soon. |
…can be checked easily with ncdump. Added the test and associated files to both cmake and autotools build systems.
Issue fixed unless I hear differently. |
Investigating issue originally reported at
netcdf4-python
:It appears (from the other thread) that this issue is inherited from the C library. This issue will track progress confirming this and, if confirmed (as I suspect it will be), fixing the issue. See other thread for full details.
Attached is the test.nc file which reportedly crashes ncdump.
test.nc.gz
The text was updated successfully, but these errors were encountered: