Repository navigation
Conversation
Fletcher32.decode copied the payload into a caller-supplied 'out' buffer without checking its size: a smaller buffer led to an out-of-bounds write, while a larger buffer left its tail untouched (stale data). Validate the destination size before the copy and raise ValueError with the expected payload size instead. The zero-length payload case now skips the memcpy entirely, so an empty buffer is never indexed. Add tests for oversized, undersized, exact-size and bytearray destinations.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #897 +/- ##
=======================================
Coverage 89.71% 89.71%
=======================================
Files 27 27
Lines 914 914
=======================================
Hits 820 820
Misses 94 94 🚀 New features to boost your workflow:
|
Author
|
Note on the red That is the zfpy 1.0.1.post0 version string being parsed with I've kept the change scoped to |
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.
The SIMD compilation flags in
src/numcodecs/meson.buildare GCC spellings(
-msse2,-mavx2). MSVC rejects both, socc.has_argument('-msse2')andcc.has_argument('-mavx2')return false on Windows and the vendored Bloscshuffle never gets built, while the flag list a few hundred lines below would
have passed the same GCC flags to the compiler. This makes the detection and the
flags agree with the compiler that is actually building:
/arch:AVX2on MSVC,-mavx2elsewhere;probing
-msse2on the other compilers;hard-coded
-msse2/-mavx2, and skip the redundant switch on MSVC.disabled()options andDISABLE_NUMCODECS_SSE2/DISABLE_NUMCODECS_AVX2stillwin, so packaging recipes that turn the features off keep working.
Verification:
meson setupreaches the SIMD probe and reportsCompiler for C supports arguments -msse2: YES/-mavx2: YESwith the localGCC 14.2 toolchain, i.e. the non-MSVC path is unchanged. I do not have MSVC on
this machine, so the
/arch:branch is not exercised locally; it is a spellingchange to the flag the compiler documents.
Closes #866.