Fix empty Blosc buffer round-trips - #854
Conversation
|
🤖 AI text below 🤖 Thanks for the fix — the diagnosis of #831 is right, and the mechanical concerns all check out (no buffer leaks on the early return, validation is O(1), the vendored c-blosc 1.21.7 provides Correctness / compat
Consistency / diagnostics
Tests / docs
Minor: the new test's |
Preserve trailing-byte compatibility, keep empty-frame output failures loud, verify the full decompressed size, and expand regression and build-documentation coverage. Generated-by: OpenAI Codex
|
Thanks for the detailed review. I addressed the in-scope findings in e3692a4:
I left The follow-up passes Cython 3.1.3 transpilation and |
Append the empty-array case so existing fixture indices keep their previous meaning. Generated-by: OpenAI Codex
Fixes #831.
Summary
blosc_cbuffer_validatewas introducedThe validation first proves that the complete 16-byte header is present, then bounds the
declared frame size by the actual input and validates exactly that frame. This rejects
truncation while preserving the existing behavior of ignoring bytes after the first frame.
Validation
malformed-frame matrix: 6,193 checks, 0 errors
git diff --checkpassedChecklist
docs/release.mdAI assistance
OpenAI Codex assisted with reproduction, implementation, test planning, validation, review,
and the follow-up changes. The account owner authorized publication; the broad fork workflows
require maintainer approval before they can run.