Repository navigation
Conversation
Update all usage of Vgetname and Vgetclass to include the new size_t* buffer size argument, using the size of the buffer that has been allocated as part of the typedef.
The NeXus API takes NXname (char[128]) buffers for names and classes. test/napi_test.c declared these name buffers as char[64] and got away with this mismatch because previous versions of HDF4 only wrote the actual (shorter) names; HDF4 4.4.0 NUL-pads the entire buffer, meaning that the write spills over. Depending on compiler options and architecture details, this can cause the test to segfault.
Contributor
|
In case you are not aware, the NeXus C-API is no longer supported by the NeXus International Advisory Committee, and the original author has now retired. I believe that it is even under discussion whether this repository should be removed from this organization's Github pages. If you are interested in maintaining this code, it may be sensible to fork the repository to keep it active. I can raise the issue at the next NIAC teleconference. |
Contributor
Author
|
Hi @rayosborn, I'm not looking to be the long term maintainer of the library; I'm just keeping it alive in Debian (and derivatives) as it appears to be used by a couple of other packages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HDF4.4 changes the function signature of the
VgetnameandVgetclassfunctions to include a buffer length in/out parameter.This PR updates all usage of
VgetnameandVgetclassto include the newsize_t*buffer size argument, using the size of the buffer that has been allocated as part of the typedef.Closes: #481