Skip to content

Fix initialization from prefilled capture buffers - #63

Open
omrzk wants to merge 1 commit into
rusticata:masterfrom
omrzk:fix/prefilled-reader-57
Open

omrzk wants to merge 1 commit into
rusticata:masterfrom
omrzk:fix/prefilled-reader-57

Conversation

@omrzk

@omrzk omrzk commented Oct 31, 2026

Copy link
Copy Markdown

A complete header buffered by create_reader was followed by a second read in from_buffer, which can fail when a streaming decoder receives an empty output buffer or block waiting for more input. Reuse the buffered header for both PCAP and PCAPNG readers.

Fixes #57.

Validation: the original full-buffer/header regressions fail; all 64 unit/integration tests with all features and all 50 without default features pass. cargo check --all-features, formatting and diff checks pass. The added readers are fixtures modeling a decoder rejecting empty output and a producer that must not be read again; no zstd process is used.

On current stable, the full test command still fails two existing doctests with denied unused-assignment warnings, and strict Clippy has 11 existing warnings/errors. Both reproduce on unchanged master a5ca3c6; neither is described as passing.

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.

create_reader always returns ReadError if read operation of the underlying reader gives large output

1 participant