Skip to content
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

Fix off-by-one in char_buffer_length. #1060

Merged
merged 3 commits into from
Nov 29, 2024
Merged

Fix off-by-one in char_buffer_length. #1060

merged 3 commits into from
Nov 29, 2024

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Nov 29, 2024

No description provided.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.12%. Comparing base (abe8c27) to head (4d3b0f2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1060      +/-   ##
==========================================
+ Coverage   87.11%   87.12%   +0.01%     
==========================================
  Files         101      101              
  Lines        6114     6121       +7     
==========================================
+ Hits         5326     5333       +7     
  Misses        788      788              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1uc 1uc marked this pull request as ready for review November 29, 2024 13:47
Copy link
Member

@alkino alkino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@1uc 1uc merged commit 17d8dfd into master Nov 29, 2024
37 checks passed
@1uc 1uc deleted the 1uc/fix-off-by-one branch November 29, 2024 14:08
1uc added a commit that referenced this pull request Dec 2, 2024
* backport: Allow reading not-quite null-terminated strings.

For fixed-length strings that have a padding mode that suggests they're
null-terminated are in fact not required to be null-terminated, we (silently)
fail to read the last character. Since, HDF5 will create such string, h5dump
will display the file and h5py will read the string; we opted to allow it and
also read the string into and `std::string` (which is variable length and already
not guaranteed to have the same length as the fixed length string).

HighFive will continue to not allow writing null-terminated strings that aren't
via `write`.

* backport:  Fix off-by-one in char_buffer_length.

Backports: (#1056), ( #1060)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants