mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
Previously, the "allow EndOfStream" part of this logic was too permissive. If there are a few dangling bytes at the end of the stream, that should be treated as a bad magic number. The only case where EndOfStream is allowed is when the stream is truly at the end, with exactly zero bytes available.